Merge pull request #139 from puremourning/no-name

Don't create a new buffer when opening the vimspector tab
This commit is contained in:
mergify[bot] 2020-03-28 10:19:25 +00:00 committed by GitHub
commit 0a0cd88545
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 10 deletions

View file

@ -22,7 +22,7 @@ from vimspector import utils
class CodeView( object ): class CodeView( object ):
def __init__( self, window, original_window, api_prefix ): def __init__( self, window, api_prefix ):
self._window = window self._window = window
self._api_prefix = api_prefix self._api_prefix = api_prefix
@ -42,7 +42,6 @@ class CodeView( object ):
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>' )

View file

@ -150,10 +150,6 @@ class DebugSession( object ):
adapter = adapter_dict adapter = adapter_dict
# TODO: Do we want some form of persistence ? e.g. self._staticVariables,
# set from an api call like SetLaunchParam( 'var', 'value' ), perhaps also a
# way to load .vimspector.local.json which just sets variables
#
# Additional vars as defined by VSCode: # Additional vars as defined by VSCode:
# #
# ${workspaceFolder} - the path of the folder opened in VS Code # ${workspaceFolder} - the path of the folder opened in VS Code
@ -461,14 +457,11 @@ class DebugSession( object ):
def _SetUpUI( self ): def _SetUpUI( self ):
original_window = vim.current.window vim.command( 'tabedit %' )
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._codeView = code.CodeView( vim.current.window,
original_window,
self._api_prefix ) self._api_prefix )
# Call stack # Call stack