Scratch buffer still makes sense for the code window buffer where we ask for it from the sevrer

This commit is contained in:
Ben Jackson 2020-07-11 11:53:39 +01:00
commit b0d41eb347
3 changed files with 3 additions and 2 deletions

View file

@ -36,7 +36,7 @@ class StackTraceView( object ):
self._threads = []
self._sources = {}
utils.SetUpScratchBuffer( self._buf, 'vimspector.StackTrace' )
utils.SetUpHiddenBuffer( self._buf, 'vimspector.StackTrace' )
vim.current.buffer = self._buf
utils.SetUpUIWindow( vim.current.window )

View file

@ -97,6 +97,7 @@ def CleanUpHiddenBuffer( buf ):
def SetUpScratchBuffer( buf, name ):
SetUpHiddenBuffer( buf, name )
buf.options[ 'bufhidden' ] = 'wipe'
def SetUpHiddenBuffer( buf, name ):

View file

@ -133,7 +133,7 @@ class VariablesView( object ):
# Set up the "Variables" buffer in the variables_win
self._scopes: typing.List[ Scope ] = []
self._vars = View( variables_win, {}, self._DrawScopes )
utils.SetUpScratchBuffer( self._vars.buf, 'vimspector.Variables' )
utils.SetUpHiddenBuffer( self._vars.buf, 'vimspector.Variables' )
with utils.LetCurrentWindow( variables_win ):
vim.command(
'nnoremap <buffer> <CR> :call vimspector#ExpandVariable()<CR>' )