Use prompt buffer for Console

Like VSCode does, compbine console and stdout, and allow you to enter
commands in the console. It's all a bit janky right now and the
insertion point isn't ideal (as not all output is interactive) and some
output is asynchronous via a somewhat different channel.
This commit is contained in:
Ben Jackson 2018-06-10 18:32:16 +01:00
commit b72bc7dfbf
4 changed files with 79 additions and 17 deletions

View file

@ -243,6 +243,10 @@ class DebugSession( object ):
self._variablesView.AddWatch( self._stackTraceView.GetCurrentFrame(),
expression )
def EvaluateConsole( self, expression ):
self._outputView.Evaluate( self._stackTraceView.GetCurrentFrame(),
expression )
def DeleteWatch( self ):
self._variablesView.DeleteWatch()
@ -304,7 +308,8 @@ class DebugSession( object ):
# Output/logging
vim.command( '10spl' )
vim.command( 'enew' )
self._outputView = output.OutputView( vim.current.window )
self._outputView = output.OutputView( self._connection,
vim.current.window )
def ClearCurrentFrame( self ):
self.SetCurrentFrame( None )
@ -371,6 +376,7 @@ class DebugSession( object ):
self._connection = None
self._stackTraceView.ConnectionClosed()
self._variablesView.ConnectionClosed()
self._outputView.ConnectionClosed()
if callback:
callback()