diff --git a/README.md b/README.md index ae583ab..55019a4 100644 --- a/README.md +++ b/README.md @@ -720,7 +720,7 @@ You can configure your choices in the `.vimspector.json`. See ## Variables and scopes * Current scope shows values of locals. -* Use `` to expand/collapse (+, -). +* Use ``, or double-click with left mouse to expand/collapse (+, -). * When changing the stack frame the locals window updates. * While paused, hover to see values @@ -737,7 +737,7 @@ to add a new watch expression. typing the expression. Commit with ``. * Alternatively, use `:VimspectorWatch `. Tab-completion for expression is available in some debug adapters. -* Expand result with ``. +* Expand result with ``, or double-click with left mouse. * Delete with ``. ![watch window](https://puremourning.github.io/vimspector-web/img/vimspector-watch-window.png) @@ -762,8 +762,8 @@ let g:ycm_semantic_triggers = { ## Stack Traces -* In the threads window, use `` to expand/collapse. -* Use `` on a stack frame to jump to it. +* In the threads window, use ``, or double-click with left mouse to expand/collapse. +* Use ``, or double-click with left mouse on a stack frame to jump to it. ![stack trace](https://puremourning.github.io/vimspector-web/img/vimspector-callstack-window.png) diff --git a/python3/vimspector/stack_trace.py b/python3/vimspector/stack_trace.py index 6caccc8..8af6536 100644 --- a/python3/vimspector/stack_trace.py +++ b/python3/vimspector/stack_trace.py @@ -40,7 +40,10 @@ class StackTraceView( object ): utils.SetUpHiddenBuffer( self._buf, 'vimspector.StackTrace' ) utils.SetUpUIWindow( win ) - vim.command( 'nnoremap :call vimspector#GoToFrame()' ) + vim.command( 'nnoremap ' + ':call vimspector#GoToFrame()' ) + vim.command( 'nnoremap <2-LeftMouse> ' + ':call vimspector#GoToFrame()' ) self._line_to_frame = {} self._line_to_thread = {} diff --git a/python3/vimspector/variables.py b/python3/vimspector/variables.py index 5694e46..b50793d 100644 --- a/python3/vimspector/variables.py +++ b/python3/vimspector/variables.py @@ -132,13 +132,18 @@ class VariablesView( object ): self._connection = None self._current_syntax = '' + def AddExpandMappings(): + vim.command( 'nnoremap ' + ':call vimspector#ExpandVariable()' ) + vim.command( 'nnoremap <2-LeftMouse> ' + ':call vimspector#ExpandVariable()' ) + # Set up the "Variables" buffer in the variables_win self._scopes: typing.List[ Scope ] = [] self._vars = View( variables_win, {}, self._DrawScopes ) utils.SetUpHiddenBuffer( self._vars.buf, 'vimspector.Variables' ) with utils.LetCurrentWindow( variables_win ): - vim.command( - 'nnoremap :call vimspector#ExpandVariable()' ) + AddExpandMappings() # Set up the "Watches" buffer in the watches_win (and create a WinBar in # there) @@ -150,8 +155,7 @@ class VariablesView( object ): 'vimspector#AddWatchPrompt', 'vimspector#OmniFuncWatch' ) with utils.LetCurrentWindow( watches_win ): - vim.command( - 'nnoremap :call vimspector#ExpandVariable()' ) + AddExpandMappings() vim.command( 'nnoremap :call vimspector#DeleteWatch()' )