From 242764edc70808eb6ec7be5a057ca4d41c1b9329 Mon Sep 17 00:00:00 2001 From: timsu92 <33785401+timsu92@users.noreply.github.com> Date: Sun, 9 Apr 2023 19:36:24 +0800 Subject: [PATCH] doautocmd VimspectorJumpedToFrame after cursor moved --- python3/vimspector/code.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python3/vimspector/code.py b/python3/vimspector/code.py index 0a18fc56..99b4fc3e 100644 --- a/python3/vimspector/code.py +++ b/python3/vimspector/code.py @@ -132,7 +132,6 @@ def SetCurrentFrame( self, frame, should_jump_to_location ): with utils.LetCurrentWindow( self._window ): try: utils.OpenFileInCurrentWindow( frame[ 'source' ][ 'path' ] ) - vim.command( 'doautocmd User VimspectorJumpedToFrame' ) except vim.error: self._logger.exception( 'Unexpected vim error opening file {}'.format( frame[ 'source' ][ 'path' ] ) ) @@ -158,6 +157,8 @@ def SetCurrentFrame( self, frame, should_jump_to_location ): vim.command( 'normal! zv' ) + vim.command( 'doautocmd User VimspectorJumpedToFrame' ) + self.current_syntax = utils.ToUnicode( vim.current.buffer.options[ 'syntax' ] )