vim-patch:fd31be29b822 (#17114)

Update runtime files
fd31be29b8
This commit is contained in:
Christian Clason
2022-01-17 11:58:36 +01:00
committed by GitHub
parent 0c0469c4f5
commit 3906b2d4fc
10 changed files with 44 additions and 49 deletions

View File

@@ -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)
let lnum = substitute(a:msg, '.*line="\([^"]*\)".*', '\1', '')
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
@@ -1352,6 +1361,9 @@ func s:HandleCursor(msg)
call s:InstallWinbar()
else
exe 'edit ' . fnameescape(fname)
endif
augroup Termdebug
au! SwapExists
augroup END
endif
exe lnum