diff options
| author | Christian Clason <c.clason@uni-graz.at> | 2022-01-17 11:58:36 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-17 11:58:36 +0100 |
| commit | 3906b2d4fc617c6b03f7c9a615d18b70d7250e80 (patch) | |
| tree | ff85808e08ae5388a939dedc40a4c00286911673 /runtime/pack/dist/opt/termdebug/plugin | |
| parent | 0c0469c4f59bf51a6e666a49d69cdb33e93bdf1b (diff) | |
| download | rneovim-3906b2d4fc617c6b03f7c9a615d18b70d7250e80.tar.gz rneovim-3906b2d4fc617c6b03f7c9a615d18b70d7250e80.tar.bz2 rneovim-3906b2d4fc617c6b03f7c9a615d18b70d7250e80.zip | |
vim-patch:fd31be29b822 (#17114)
Update runtime files
https://github.com/vim/vim/commit/fd31be29b8220ee1cb0b3460c82f2634ae3cc370
Diffstat (limited to 'runtime/pack/dist/opt/termdebug/plugin')
| -rw-r--r-- | runtime/pack/dist/opt/termdebug/plugin/termdebug.vim | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim index c881133b72..829e41001b 100644 --- a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim +++ b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim @@ -2,7 +2,7 @@ " " Author: Bram Moolenaar " Copyright: Vim license applies, see ":help license" -" Last Change: 2021 Dec 16 +" Last Change: 2022 Jan 13 " " WORK IN PROGRESS - Only the basics work " Note: On MS-Windows you need a recent version of gdb. The one included with @@ -1344,6 +1344,15 @@ func s:HandleCursor(msg) if lnum =~ '^[0-9]*$' call s:GotoSourcewinOrCreateIt() if expand('%:p') != fnamemodify(fname, ':p') + augroup Termdebug + " Always open a file read-only instead of showing the ATTENTION + " prompt, since we are unlikely to want to edit the file. + " The file may be changed but not saved, warn for that. + au SwapExists * echohl WarningMsg + \ | echo 'Warning: file is being edited elsewhere' + \ | echohl None + \ | let v:swapchoice = 'o' + augroup END if &modified " TODO: find existing window exe 'split ' . fnameescape(fname) @@ -1352,6 +1361,9 @@ func s:HandleCursor(msg) else exe 'edit ' . fnameescape(fname) endif + augroup Termdebug + au! SwapExists + augroup END endif exe lnum normal! zv |