From 926029e343cccae0db08533298a2e13aa87755dc Mon Sep 17 00:00:00 2001 From: Ben Jackson Date: Sun, 16 Feb 2020 22:30:55 +0000 Subject: [PATCH] Set some window options to their deafults --- python3/vimspector/stack_trace.py | 1 + python3/vimspector/utils.py | 7 +++++++ python3/vimspector/variables.py | 3 +++ 3 files changed, 11 insertions(+) diff --git a/python3/vimspector/stack_trace.py b/python3/vimspector/stack_trace.py index 96edb4d..9a98618 100644 --- a/python3/vimspector/stack_trace.py +++ b/python3/vimspector/stack_trace.py @@ -42,6 +42,7 @@ class StackTraceView( object ): # FIXME: Remove all usage of "Windown" and just use buffers to prevent all # the bugs around the window being closed. self._win = vim.current.window + utils.SetUpUIWindow( self._win ) vim.command( 'nnoremap :call vimspector#GoToFrame()' ) diff --git a/python3/vimspector/utils.py b/python3/vimspector/utils.py index 3e58330..35d5d63 100644 --- a/python3/vimspector/utils.py +++ b/python3/vimspector/utils.py @@ -126,6 +126,13 @@ def SetUpPromptBuffer( buf, name, prompt, callback, hidden=False ): Escape( callback ) ) ) +def SetUpUIWindow( win ): + win.options[ 'wrap' ] = False + win.options[ 'number' ] = False + win.options[ 'signcolumn' ] = 'no' + win.options[ 'spell' ] = False + win.options[ 'list' ] = False + @contextlib.contextmanager def ModifiableScratchBuffer( buf ): diff --git a/python3/vimspector/variables.py b/python3/vimspector/variables.py index 92bbedf..e86b23f 100644 --- a/python3/vimspector/variables.py +++ b/python3/vimspector/variables.py @@ -65,6 +65,9 @@ class VariablesView( object ): 'Expression: ', 'vimspector#AddWatchPrompt' ) + utils.SetUpUIWindow( self._vars.win ) + utils.SetUpUIWindow( self._watch.win ) + has_balloon = int( vim.eval( "has( 'balloon_eval' )" ) ) has_balloon_term = int( vim.eval( "has( 'balloon_eval_term' )" ) )