From 5a09914ee702256ee192f7dd469a1ee622dcdabf Mon Sep 17 00:00:00 2001 From: Ben Jackson Date: Sun, 20 May 2018 21:54:27 +0100 Subject: [PATCH] Dont mess up other window placment --- python3/vimspector/debug_session.py | 41 +++++++++++++---------------- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/python3/vimspector/debug_session.py b/python3/vimspector/debug_session.py index 81e1cc1..6c52c2f 100644 --- a/python3/vimspector/debug_session.py +++ b/python3/vimspector/debug_session.py @@ -40,9 +40,7 @@ class DebugSession( object ): self._SetUpUI() - def _SetUpUI( self ): - # Code window vim.command( 'tabnew' ) self._uiTab = vim.current.tabpage @@ -55,30 +53,31 @@ class DebugSession( object ): vim.command( 'nnoremenu WinBar.Pause :call vimspector#Pause()' ) # Threads - vim.command( 'vspl' ) + vim.command( '50vspl' ) vim.command( 'enew' ) self._threadsBuffer = vim.current.buffer utils.SetUpScratchBuffer( self._threadsBuffer ) - with utils.TemporaryVimOption( 'equalalways', 1 ): - # Call stack - vim.command( 'spl' ) - vim.command( 'enew' ) - self._stackTraceView = stack_trace.StackTraceView( self, - self._connection, - vim.current.buffer ) + with utils.TemporaryVimOption( 'eadirection', 'ver' ): + with utils.TemporaryVimOption( 'equalalways', 1 ): + # Call stack + vim.command( 'spl' ) + vim.command( 'enew' ) + self._stackTraceView = stack_trace.StackTraceView( self, + self._connection, + vim.current.buffer ) - # Output/logging - vim.command( 'spl' ) - vim.command( 'enew' ) - self._outputBuffer = vim.current.buffer - utils.SetUpScratchBuffer( self._outputBuffer ) + # Output/logging + vim.command( 'spl' ) + vim.command( 'enew' ) + self._outputBuffer = vim.current.buffer + utils.SetUpScratchBuffer( self._outputBuffer ) - # Variables - vim.command( 'spl' ) - vim.command( 'enew' ) - self._variablesView = variables.VariablesView( self._connection, - vim.current.buffer ) + # Variables + vim.command( 'spl' ) + vim.command( 'enew' ) + self._variablesView = variables.VariablesView( self._connection, + vim.current.buffer ) def SetCurrentFrame( self, frame ): @@ -199,14 +198,12 @@ class DebugSession( object ): 'command': 'configurationDone', } ) - def OnEvent_output( self, message ): with utils.ModifiableScratchBuffer( self._outputBuffer ): t = [ message[ 'body' ][ 'category' ] + ':' + '-' * 20 ] t += message[ 'body' ][ 'output' ].splitlines() self._outputBuffer.append( t, 0 ) - def OnEvent_stopped( self, message ): self._currentThread = message[ 'body' ][ 'threadId' ]