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' ] )