making sure that float window is not modifiable inside nvim

This commit is contained in:
dsych 2020-12-23 23:32:37 -05:00 committed by Ben Jackson
commit 04a5e889f9
2 changed files with 2 additions and 0 deletions

View file

@ -103,6 +103,7 @@ function! vimspector#internal#balloon#CreateTooltip(is_hover, ...)
" create the content window
let buf_id = nvim_create_buf(v:false, v:true)
call nvim_buf_set_lines(buf_id, 0, -1, v:true, body)
call nvim_buf_set_option(buf_id, 'modifiable', v:false)
let s:float_win = nvim_open_win(buf_id, v:false, opts)
call nvim_win_set_option(s:float_win, 'wrap', v:true)

View file

@ -272,6 +272,7 @@ class VariablesView( object ):
def _DrawEval(self):
with utils.RestoreCursorPosition():
with utils.ModifiableScratchBuffer( self._variable_eval_view.buf ):
utils.ClearBuffer( self._variable_eval_view.buf )
icon = '+' if self._variable_eval.IsExpandable() and not self._variable_eval.IsExpanded() else '-'