Name the buffers so it's clearer what they do
This actually restricts us to a single debugging pane, but that's really already a restriction of the vim-side (only one job, etc.). Support for multiple sessions isn't a priority.
This commit is contained in:
parent
3f73d1c2f8
commit
7e76c9763d
4 changed files with 8 additions and 7 deletions
|
|
@ -200,7 +200,7 @@ class DebugSession( object ):
|
|||
vim.command( '50vspl' )
|
||||
vim.command( 'enew' )
|
||||
self._threadsBuffer = vim.current.buffer
|
||||
utils.SetUpScratchBuffer( self._threadsBuffer )
|
||||
utils.SetUpScratchBuffer( self._threadsBuffer, "vimspector.Threads" )
|
||||
|
||||
with utils.TemporaryVimOption( 'eadirection', 'ver' ):
|
||||
with utils.TemporaryVimOption( 'equalalways', 1 ):
|
||||
|
|
@ -215,7 +215,7 @@ class DebugSession( object ):
|
|||
vim.command( 'spl' )
|
||||
vim.command( 'enew' )
|
||||
self._outputBuffer = vim.current.buffer
|
||||
utils.SetUpScratchBuffer( self._outputBuffer )
|
||||
utils.SetUpScratchBuffer( self._outputBuffer, 'vimspector.Console' )
|
||||
|
||||
# Variables
|
||||
vim.command( 'spl' )
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ class StackTraceView( object ):
|
|||
self._session = session
|
||||
self._connection = connection
|
||||
|
||||
utils.SetUpScratchBuffer( self._buf )
|
||||
utils.SetUpScratchBuffer( self._buf, 'vimspector.StackTrace' )
|
||||
vim.current.buffer = self._buf
|
||||
vim.command( 'nnoremap <buffer> <CR> :call vimspector#GoToFrame()<CR>' )
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ def SetUpLogging( logger ):
|
|||
logger.addHandler( handler )
|
||||
|
||||
|
||||
def SetUpScratchBuffer( buf ):
|
||||
def SetUpScratchBuffer( buf, name ):
|
||||
buf.options[ 'buftype' ] = 'nofile'
|
||||
buf.options[ 'swapfile' ] = False
|
||||
buf.options[ 'modifiable' ] = False
|
||||
|
|
@ -37,6 +37,7 @@ def SetUpScratchBuffer( buf ):
|
|||
buf.options[ 'readonly' ] = True
|
||||
buf.options[ 'buflisted' ] = False
|
||||
buf.options[ 'bufhidden' ] = 'wipe'
|
||||
buf.name = name
|
||||
|
||||
|
||||
@contextlib.contextmanager
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@ from vimspector import utils
|
|||
|
||||
class VariablesView( object ):
|
||||
def __init__( self, connection, buf ):
|
||||
vim.current.buffer = buf
|
||||
|
||||
self._buf = buf
|
||||
self._connection = connection
|
||||
|
||||
|
|
@ -47,9 +49,7 @@ class VariablesView( object ):
|
|||
vim.command(
|
||||
'nnoremap <buffer> <DEL> :call vimspector#DeleteWatch()<CR>' )
|
||||
|
||||
vim.current.buffer = buf
|
||||
|
||||
utils.SetUpScratchBuffer( self._buf )
|
||||
utils.SetUpScratchBuffer( self._buf, 'vimspector.Variables' )
|
||||
|
||||
def Clear( self ):
|
||||
with utils.ModifiableScratchBuffer( self._buf ):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue