0
0
mirror of https://github.com/vim/vim.git synced 2025-07-04 23:07:33 -04:00

runtime(termdebug): re-indent lines (#12857)

Signed-off-by: shane.xb.qian <shane.qian@foxmail.com>
This commit is contained in:
Shane-XB-Qian 2023-08-21 02:06:49 +08:00 committed by GitHub
parent f5d0f54790
commit 19968fc4ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1485,15 +1485,15 @@ func s:HandleCursor(msg)
if lnum =~ '^[0-9]*$'
call s:GotoSourcewinOrCreateIt()
if expand('%:p') != fnamemodify(fname, ':p')
echomsg 'different fname: "' .. expand('%:p') .. '" vs "' .. fnamemodify(fname, ':p') .. '"'
augroup Termdebug
" Always open a file read-only instead of showing the ATTENTION
" prompt, since it is unlikely we 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'
echomsg 'different fname: "' .. expand('%:p') .. '" vs "' .. fnamemodify(fname, ':p') .. '"'
augroup Termdebug
" Always open a file read-only instead of showing the ATTENTION
" prompt, since it is unlikely we 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