Do not send event after leave buffer.
This commit is contained in:
parent
50dc55e0e8
commit
bcf4120ba4
3 changed files with 5 additions and 11 deletions
|
|
@ -134,6 +134,7 @@ class CodeView( object ):
|
|||
utils.JumpToWindow( self._window )
|
||||
try:
|
||||
utils.OpenFileInCurrentWindow( frame[ 'source' ][ 'path' ] )
|
||||
vim.command( 'doautocmd <nomodeline> User VimspectorJumpedToFrame' )
|
||||
except vim.error:
|
||||
self._logger.exception( 'Unexpected vim error opening file {}'.format(
|
||||
frame[ 'source' ][ 'path' ] ) )
|
||||
|
|
|
|||
|
|
@ -76,14 +76,7 @@ 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 VimspectorFrameEnter' )
|
||||
except vim.error as e:
|
||||
if 'E325' not in str( e ):
|
||||
raise
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue