From 766a10783982936da8f1eaf61280338fcd85019a Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Thu, 22 Apr 2021 22:53:42 -0400 Subject: vim-patch:589edb340454 Updte runtime files https://github.com/vim/vim/commit/589edb340454e7f1b19358f129287a636d53d0e1 Omit state() changes in eval.txt because patch v8.1.2047 is not merged. --- .../pack/dist/opt/termdebug/plugin/termdebug.vim | 57 ++++++++++++++-------- 1 file changed, 37 insertions(+), 20 deletions(-) (limited to 'runtime/pack/dist/opt/termdebug/plugin') diff --git a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim index fa5d064048..be5d4b345e 100644 --- a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim +++ b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim @@ -552,9 +552,14 @@ func s:DecodeMessage(quotedText) if a:quotedText[i] == '\' let i += 1 if a:quotedText[i] == 'n' - " drop \n - let i += 1 - continue + " drop \n + let i += 1 + continue + elseif a:quotedText[i] == 't' + " append \t + let i += 1 + let result .= "\t" + continue endif endif let result .= a:quotedText[i] @@ -715,12 +720,22 @@ func s:CommOutput(job_id, msgs, event) endfor endfunc +func s:GotoProgram() + if has('win32') + if executable('powershell') + call system(printf('powershell -Command "add-type -AssemblyName microsoft.VisualBasic;[Microsoft.VisualBasic.Interaction]::AppActivate(%d);"', s:pid)) + endif + else + win_gotoid(s:ptywin) + endif +endfunc + " Install commands in the current window to control the debugger. func s:InstallCommands() let save_cpo = &cpo set cpo&vim - command Break call s:SetBreakpoint() + command -nargs=? Break call s:SetBreakpoint() command Clear call s:ClearBreakpoint() command Step call s:SendCommand('-exec-step') command Over call s:SendCommand('-exec-next') @@ -738,7 +753,7 @@ func s:InstallCommands() command -range -nargs=* Evaluate call s:Evaluate(, ) command Gdb call win_gotoid(s:gdbwin) - command Program call win_gotoid(s:ptywin) + command Program call s:GotoProgram() command Source call s:GotoSourcewinOrCreateIt() command Asm call s:GotoAsmwinOrCreateIt() command Winbar call s:InstallWinbar() @@ -801,7 +816,7 @@ func s:DeleteCommands() endfunc " :Break - Set a breakpoint at the cursor position. -func s:SetBreakpoint() +func s:SetBreakpoint(at) " Setting a breakpoint may not work while the program is running. " Interrupt to make it work. let do_continue = 0 @@ -814,9 +829,11 @@ func s:SetBreakpoint() endif sleep 10m endif + " Use the fname:lnum format, older gdb can't handle --source. - call s:SendCommand('-break-insert ' - \ . fnameescape(expand('%:p')) . ':' . line('.')) + let at = empty(a:at) ? + \ fnameescape(expand('%:p')) . ':' . line('.') : a:at + call s:SendCommand('-break-insert ' . at) if do_continue call s:SendCommand('-exec-continue') endif @@ -831,14 +848,14 @@ func s:ClearBreakpoint() let idx = 0 for id in s:breakpoint_locations[bploc] if has_key(s:breakpoints, id) - " Assume this always works, the reply is simply "^done". - call s:SendCommand('-break-delete ' . id) - for subid in keys(s:breakpoints[id]) - exe 'sign unplace ' . s:Breakpoint2SignNumber(id, subid) - endfor - unlet s:breakpoints[id] - unlet s:breakpoint_locations[bploc][idx] - break + " Assume this always works, the reply is simply "^done". + call s:SendCommand('-break-delete ' . id) + for subid in keys(s:breakpoints[id]) + exe 'sign unplace ' . s:Breakpoint2SignNumber(id, subid) + endfor + unlet s:breakpoints[id] + unlet s:breakpoint_locations[bploc][idx] + break else let idx += 1 endif @@ -1242,8 +1259,8 @@ func s:HandleBreakpointDelete(msg) if has_key(s:breakpoints, id) for [subid, entry] in items(s:breakpoints[id]) if has_key(entry, 'placed') - exe 'sign unplace ' . s:Breakpoint2SignNumber(id, subid) - unlet entry['placed'] + exe 'sign unplace ' . s:Breakpoint2SignNumber(id, subid) + unlet entry['placed'] endif endfor unlet s:breakpoints[id] @@ -1267,7 +1284,7 @@ func s:BufRead() for [id, entries] in items(s:breakpoints) for [subid, entry] in items(entries) if entry['fname'] == fname - call s:PlaceSign(id, subid, entry) + call s:PlaceSign(id, subid, entry) endif endfor endfor @@ -1279,7 +1296,7 @@ func s:BufUnloaded() for [id, entries] in items(s:breakpoints) for [subid, entry] in items(entries) if entry['fname'] == fname - let entry['placed'] = 0 + let entry['placed'] = 0 endif endfor endfor -- cgit From b918d99a61a472727de25861643c0d79fa57730a Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 24 Apr 2021 18:13:46 -0400 Subject: vim-patch:91359014b359 Update runtime files. https://github.com/vim/vim/commit/91359014b359cf816bf943fe2c7d492996263def --- runtime/pack/dist/opt/termdebug/plugin/termdebug.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'runtime/pack/dist/opt/termdebug/plugin') diff --git a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim index be5d4b345e..1f5e6682e7 100644 --- a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim +++ b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim @@ -292,7 +292,7 @@ func s:StartDebug_term(dict) sleep 10m endwhile - " Interpret commands while the target is running. This should usualy only be + " Interpret commands while the target is running. This should usually only be " exec-interrupt, since many commands don't work properly while the target is " running. call s:SendCommand('-gdb-set mi-async on') @@ -348,7 +348,7 @@ func s:StartDebug_prompt(dict) return endif - " Interpret commands while the target is running. This should usualy only + " Interpret commands while the target is running. This should usually only " be exec-interrupt, since many commands don't work properly while the " target is running. call s:SendCommand('-gdb-set mi-async on') -- cgit From 62adc04f08f78ab3fc179176c9dc41271e7340d6 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 24 Apr 2021 20:59:08 -0400 Subject: vim-patch:469bdbde1e8e Minor runtime file updates. https://github.com/vim/vim/commit/469bdbde1e8ea8110705327ab193acca79296742 --- runtime/pack/dist/opt/termdebug/plugin/termdebug.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'runtime/pack/dist/opt/termdebug/plugin') diff --git a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim index 1f5e6682e7..907138c60b 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 Update: 2018 Jun 3 +" Last Change: 2019 Dec 11 " " WORK IN PROGRESS - Only the basics work " Note: On MS-Windows you need a recent version of gdb. The one included with @@ -726,7 +726,7 @@ func s:GotoProgram() call system(printf('powershell -Command "add-type -AssemblyName microsoft.VisualBasic;[Microsoft.VisualBasic.Interaction]::AppActivate(%d);"', s:pid)) endif else - win_gotoid(s:ptywin) + call win_gotoid(s:ptywin) endif endfunc -- cgit From e257aff016edc1d240d66c86e84e1f10ad972fd1 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Mon, 26 Apr 2021 22:35:56 -0400 Subject: vim-patch:bc93cebb692f Update runtime files. https://github.com/vim/vim/commit/bc93cebb692f47488d66f078d1728031e9be35e7 --- runtime/pack/dist/opt/termdebug/plugin/termdebug.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/pack/dist/opt/termdebug/plugin') diff --git a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim index 907138c60b..99819c93ea 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: 2019 Dec 11 +" Last Change: 2020 Feb 19 " " WORK IN PROGRESS - Only the basics work " Note: On MS-Windows you need a recent version of gdb. The one included with -- cgit From 65821cc1b94e3beb2de19e1bb8def3fe6e82bc1f Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Wed, 28 Apr 2021 01:55:06 -0400 Subject: vim-patch:388a5d4f20b4 Update runtime files https://github.com/vim/vim/commit/388a5d4f20b4b64341d1604aa238cab85827b892 Omit vim9. --- runtime/pack/dist/opt/termdebug/plugin/termdebug.vim | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'runtime/pack/dist/opt/termdebug/plugin') diff --git a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim index 99819c93ea..41d59c39d9 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: 2020 Feb 19 +" Last Change: 2020 May 22 " " WORK IN PROGRESS - Only the basics work " Note: On MS-Windows you need a recent version of gdb. The one included with @@ -758,8 +758,10 @@ func s:InstallCommands() command Asm call s:GotoAsmwinOrCreateIt() command Winbar call s:InstallWinbar() - " TODO: can the K mapping be restored? - nnoremap K :Evaluate + if !exists('g:termdebug_map_K') || g:termdebug_map_K + let s:k_map_saved = maparg('K', 'n', 0, 1) + nnoremap K :Evaluate + endif let &cpo = save_cpo endfunc @@ -797,7 +799,10 @@ func s:DeleteCommands() delcommand Asm delcommand Winbar - nunmap K + if exists('s:k_map_saved') + call mapset('n', 0, s:k_map_saved) + unlet s:k_map_saved + endif exe 'sign unplace ' . s:pc_id for [id, entries] in items(s:breakpoints) -- cgit From df2acdc3be807393ea8d61bb94c41d792388c0de Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Wed, 28 Apr 2021 21:30:58 -0400 Subject: vim-patch:65e0d77a66b7 Update runtime files https://github.com/vim/vim/commit/65e0d77a66b7e50beb562ad554ace46c32ef8f0f Omit usr_46.txt because of vim9. --- runtime/pack/dist/opt/termdebug/plugin/termdebug.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'runtime/pack/dist/opt/termdebug/plugin') diff --git a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim index 41d59c39d9..b9ee855836 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: 2020 May 22 +" Last Change: 2020 Jun 12 " " WORK IN PROGRESS - Only the basics work " Note: On MS-Windows you need a recent version of gdb. The one included with @@ -799,7 +799,7 @@ func s:DeleteCommands() delcommand Asm delcommand Winbar - if exists('s:k_map_saved') + if exists('s:k_map_saved') && !empty(s:k_map_saved) call mapset('n', 0, s:k_map_saved) unlet s:k_map_saved endif -- cgit From 0a0034718c00fd9f434d20d29e415287db284bbe Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Thu, 29 Apr 2021 08:54:38 -0400 Subject: vim-patch:2547aa930b59 Update runtime files. https://github.com/vim/vim/commit/2547aa930b59f5e2bcb70e81d5a57ed461e59b4f Omit modifyOtherKeys, vim9, vim.man. --- runtime/pack/dist/opt/termdebug/plugin/termdebug.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/pack/dist/opt/termdebug/plugin') diff --git a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim index b9ee855836..82f6cc1884 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: 2020 Jun 12 +" Last Change: 2020 Jul 12 " " WORK IN PROGRESS - Only the basics work " Note: On MS-Windows you need a recent version of gdb. The one included with -- cgit From 330500a5bfb1207e0c9eb79ac27fb8244da93ce0 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 1 May 2021 14:23:09 -0400 Subject: vim-patch:cb80aa2d53e5 Update runtime files. https://github.com/vim/vim/commit/cb80aa2d53e56d3aba3b3c439fb467f29a750c5e Omit runtime/doc/tabpage.txt. Patch v8.2.1401 is not ported yet. Port optwin.vim changes without gettext(). Patch v8.2.1544 is not ported yet. --- .../pack/dist/opt/termdebug/plugin/termdebug.vim | 26 +++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) (limited to 'runtime/pack/dist/opt/termdebug/plugin') diff --git a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim index 82f6cc1884..036d17818a 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: 2020 Jul 12 +" Last Change: 2020 Oct 25 " " WORK IN PROGRESS - Only the basics work " Note: On MS-Windows you need a recent version of gdb. The one included with @@ -131,7 +131,11 @@ func s:StartDebug_internal(dict) " call ch_logfile('debuglog', 'w') let s:sourcewin = win_getid(winnr()) - let s:startsigncolumn = &signcolumn + + " Remember the old value of 'signcolumn' for each buffer that it's set in, so + " that we can restore the value for all buffers. + let b:save_signcolumn = &signcolumn + let s:signcolumn_buflist = [bufnr()] let s:save_columns = 0 let s:allleft = 0 @@ -603,8 +607,20 @@ func s:EndDebugCommon() exe 'bwipe! ' . s:ptybuf endif + " Restore 'signcolumn' in all buffers for which it was set. call win_gotoid(s:sourcewin) - let &signcolumn = s:startsigncolumn + let was_buf = bufnr() + for bufnr in s:signcolumn_buflist + if bufexists(bufnr) + exe bufnr .. "buf" + if exists('b:save_signcolumn') + let &signcolumn = b:save_signcolumn + unlet b:save_signcolumn + endif + endif + endfor + exe was_buf .. "buf" + call s:DeleteCommands() call win_gotoid(curwinid) @@ -1174,6 +1190,10 @@ func s:HandleCursor(msg) exe lnum exe 'sign unplace ' . s:pc_id exe 'sign place ' . s:pc_id . ' line=' . lnum . ' name=debugPC file=' . fname + if !exists('b:save_signcolumn') + let b:save_signcolumn = &signcolumn + call add(s:signcolumn_buflist, bufnr()) + endif setlocal signcolumn=yes endif elseif !s:stopped || fname != '' -- cgit From 2ebd1f6286211bc67cc83e3ad912d28b372ea4b6 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 1 May 2021 17:50:17 -0400 Subject: vim-patch:3132cddd209e Update runtime files https://github.com/vim/vim/commit/3132cddd209ee510bde48b6520290cb26c8f604a Omit :sort,sort() changes. --- runtime/pack/dist/opt/termdebug/plugin/termdebug.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'runtime/pack/dist/opt/termdebug/plugin') diff --git a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim index 036d17818a..e34f1cdc75 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: 2020 Oct 25 +" Last Change: 2020 Oct 28 " " WORK IN PROGRESS - Only the basics work " Note: On MS-Windows you need a recent version of gdb. The one included with @@ -1270,7 +1270,7 @@ endfunc func s:PlaceSign(id, subid, entry) let nr = printf('%d.%d', a:id, a:subid) - exe 'sign place ' . s:Breakpoint2SignNumber(a:id, a:subid) . ' line=' . a:entry['lnum'] . ' name=debugBreakpoint' . nr . ' file=' . a:entry['fname'] + exe 'sign place ' . s:Breakpoint2SignNumber(a:id, a:subid) . ' line=' . a:entry['lnum'] . ' name=debugBreakpoint' . nr . ' priority=110 file=' . a:entry['fname'] let a:entry['placed'] = 1 endfunc -- cgit From 710f0eae2f5a626a0771acbb1fb32e121bbf2bde Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 1 May 2021 19:29:13 -0400 Subject: vim-patch:1b884a005398 Update runtime files. https://github.com/vim/vim/commit/1b884a0053982335f644eec6c71027706bf3c522 Omit doc/autocmd.txt. Omit tools/emoji_list.vim. Patch v8.2.1540 is not ported. --- runtime/pack/dist/opt/termdebug/plugin/termdebug.vim | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'runtime/pack/dist/opt/termdebug/plugin') diff --git a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim index e34f1cdc75..91abe80fb5 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: 2020 Oct 28 +" Last Change: 2020 Dec 07 " " WORK IN PROGRESS - Only the basics work " Note: On MS-Windows you need a recent version of gdb. The one included with @@ -815,8 +815,12 @@ func s:DeleteCommands() delcommand Asm delcommand Winbar - if exists('s:k_map_saved') && !empty(s:k_map_saved) - call mapset('n', 0, s:k_map_saved) + if exists('s:k_map_saved') + if empty(s:k_map_saved) + nunmap K + else + call mapset('n', 0, s:k_map_saved) + endif unlet s:k_map_saved endif -- cgit From dd2bc06411a69917c6f4a47d0b6832104efa98e4 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 1 May 2021 22:09:13 -0400 Subject: vim-patch:82be4849eed0 Update runtime files. https://github.com/vim/vim/commit/82be4849eed0b8fbee45bc8da99b685ec89af59a --- runtime/pack/dist/opt/termdebug/plugin/termdebug.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/pack/dist/opt/termdebug/plugin') diff --git a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim index 91abe80fb5..a62df1dcec 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: 2020 Dec 07 +" Last Change: 2021 Jan 03 " " WORK IN PROGRESS - Only the basics work " Note: On MS-Windows you need a recent version of gdb. The one included with -- cgit