CustomUI: Make buffers non-modifiable when opened for debugging
This commit is contained in:
parent
ba83a59e88
commit
94242fa532
1 changed files with 7 additions and 2 deletions
|
|
@ -105,7 +105,10 @@ function! s:OnJumpToFrame() abort
|
|||
nmap <silent> <buffer> <LocalLeader>di <Plug>VimspectorBalloonEval
|
||||
xmap <silent> <buffer> <LocalLeader>di <Plug>VimspectorBalloonEval
|
||||
|
||||
let s:mapped[ string( bufnr() ) ] = 1
|
||||
let s:mapped[ string( bufnr() ) ] = { 'modifiable': &modifiable }
|
||||
|
||||
setlocal nomodifiable
|
||||
|
||||
endfunction
|
||||
|
||||
function! s:OnDebugEnd() abort
|
||||
|
|
@ -124,6 +127,8 @@ function! s:OnDebugEnd() abort
|
|||
silent! nunmap <buffer> <LocalLeader>dc
|
||||
silent! nunmap <buffer> <LocalLeader>di
|
||||
silent! xunmap <buffer> <LocalLeader>di
|
||||
|
||||
let &l:modifiable = s:mapped[ bufnr ][ 'modifiable' ]
|
||||
endtry
|
||||
endfor
|
||||
finally
|
||||
|
|
@ -148,7 +153,7 @@ let g:vimspector_mappings = {
|
|||
\ 'stack_trace': {},
|
||||
\ 'variables': {
|
||||
\ 'set_value': [ '<Tab>', '<C-CR>' ],
|
||||
\ },
|
||||
\ }
|
||||
\ }
|
||||
|
||||
" }}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue