Tidy up the buffers and don't switch on new
This commit is contained in:
parent
f9ecf5f05d
commit
9e0b68330e
2 changed files with 9 additions and 1 deletions
|
|
@ -149,6 +149,7 @@ class DebugSession( object ):
|
||||||
if self._uiTab:
|
if self._uiTab:
|
||||||
self._stackTraceView.Reset()
|
self._stackTraceView.Reset()
|
||||||
self._variablesView.Reset()
|
self._variablesView.Reset()
|
||||||
|
self._outputView.Reset()
|
||||||
vim.current.tabpage = self._uiTab
|
vim.current.tabpage = self._uiTab
|
||||||
vim.command( 'tabclose' )
|
vim.command( 'tabclose' )
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,9 +34,14 @@ class OutputView( object ):
|
||||||
with utils.ModifiableScratchBuffer( self._buffers[ category ] ):
|
with utils.ModifiableScratchBuffer( self._buffers[ category ] ):
|
||||||
self._buffers[ category ].append( event[ 'output' ].splitlines() )
|
self._buffers[ category ].append( event[ 'output' ].splitlines() )
|
||||||
|
|
||||||
|
def Reset( self ):
|
||||||
|
self.Clear()
|
||||||
|
|
||||||
def Clear( self ):
|
def Clear( self ):
|
||||||
for buf in self._buffers:
|
for buf in self._buffers:
|
||||||
self._buffers[ buf ] = None
|
vim.command( 'bwipeout! {0}'.format( self._buffers[ buf ].name ) )
|
||||||
|
|
||||||
|
self._buffers.clear()
|
||||||
|
|
||||||
def ShowOutput( self, category ):
|
def ShowOutput( self, category ):
|
||||||
vim.current.window = self._window
|
vim.current.window = self._window
|
||||||
|
|
@ -56,3 +61,5 @@ class OutputView( object ):
|
||||||
vim.command( "nnoremenu WinBar.{0} "
|
vim.command( "nnoremenu WinBar.{0} "
|
||||||
":call vimspector#ShowOutput( '{0}' )<CR>".format(
|
":call vimspector#ShowOutput( '{0}' )<CR>".format(
|
||||||
utils.Escape( category ) ) )
|
utils.Escape( category ) ) )
|
||||||
|
|
||||||
|
vim.command( 'bu #' )
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue