Set the code window to the current buffer
This commit is contained in:
parent
926029e343
commit
c4bedcee89
2 changed files with 8 additions and 2 deletions
|
|
@ -22,7 +22,7 @@ from vimspector import utils
|
||||||
|
|
||||||
|
|
||||||
class CodeView( object ):
|
class CodeView( object ):
|
||||||
def __init__( self, window, api_prefix ):
|
def __init__( self, window, original_window, api_prefix ):
|
||||||
self._window = window
|
self._window = window
|
||||||
self._api_prefix = api_prefix
|
self._api_prefix = api_prefix
|
||||||
|
|
||||||
|
|
@ -40,7 +40,9 @@ class CodeView( object ):
|
||||||
'breakpoints': []
|
'breakpoints': []
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
with utils.LetCurrentWindow( self._window ):
|
with utils.LetCurrentWindow( self._window ):
|
||||||
|
vim.current.buffer = original_window.buffer
|
||||||
vim.command( 'nnoremenu WinBar.Continue :call vimspector#Continue()<CR>' )
|
vim.command( 'nnoremenu WinBar.Continue :call vimspector#Continue()<CR>' )
|
||||||
vim.command( 'nnoremenu WinBar.Next :call vimspector#StepOver()<CR>' )
|
vim.command( 'nnoremenu WinBar.Next :call vimspector#StepOver()<CR>' )
|
||||||
vim.command( 'nnoremenu WinBar.Step :call vimspector#StepInto()<CR>' )
|
vim.command( 'nnoremenu WinBar.Step :call vimspector#StepInto()<CR>' )
|
||||||
|
|
|
||||||
|
|
@ -445,11 +445,15 @@ class DebugSession( object ):
|
||||||
|
|
||||||
|
|
||||||
def _SetUpUI( self ):
|
def _SetUpUI( self ):
|
||||||
|
original_window = vim.current.window
|
||||||
|
|
||||||
vim.command( 'tabnew' )
|
vim.command( 'tabnew' )
|
||||||
self._uiTab = vim.current.tabpage
|
self._uiTab = vim.current.tabpage
|
||||||
|
|
||||||
# Code window
|
# Code window
|
||||||
self._codeView = code.CodeView( vim.current.window, self._api_prefix )
|
self._codeView = code.CodeView( vim.current.window,
|
||||||
|
original_window,
|
||||||
|
self._api_prefix )
|
||||||
|
|
||||||
# Call stack
|
# Call stack
|
||||||
with utils.TemporaryVimOptions( { 'splitright': False,
|
with utils.TemporaryVimOptions( { 'splitright': False,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue