Send an event before leave buffer in window
This commit is contained in:
parent
0bb8416e11
commit
840ee09242
3 changed files with 11 additions and 5 deletions
|
|
@ -710,7 +710,6 @@ class DebugSession( object ):
|
|||
self._stackTraceView.SetSyntax( self._codeView.current_syntax )
|
||||
self._variablesView.LoadScopes( frame )
|
||||
self._variablesView.EvaluateWatches()
|
||||
vim.command( 'doautocmd <nomodeline> User VimspectorFrameWasSet' )
|
||||
|
||||
if reason == 'stopped':
|
||||
self._breakpoints.ClearTemporaryBreakpoint( frame[ 'source' ][ 'path' ],
|
||||
|
|
|
|||
|
|
@ -76,7 +76,14 @@ def WindowForBuffer( buf ):
|
|||
def OpenFileInCurrentWindow( file_name ):
|
||||
buffer_number = BufferNumberForFile( file_name )
|
||||
try:
|
||||
if "vimspectorStep" in vim.current.buffer.vars:
|
||||
del vim.current.buffer.vars["vimspectorStep"]
|
||||
# @todo: what if the same buffer is still visited by another thread
|
||||
vim.command( 'doautocmd <nomodeline> User VimspectorFrameLeavePre' )
|
||||
|
||||
vim.current.buffer = vim.buffers[ buffer_number ]
|
||||
vim.current.buffer.vars["vimspectorStep"] = 1
|
||||
vim.command( 'doautocmd <nomodeline> User VimspectorFrameWasSet' )
|
||||
except vim.error as e:
|
||||
if 'E325' not in str( e ):
|
||||
raise
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue