runtime(termdebug): fix a few issues Commit: https://github.com/vim/vim/commit/c3837a46ff5f31e9b18f8f86b6e464bed1fe20d1 Author: Ubaldo Tiberi <ubaldo.tib...@google.com> Date: Sun Jul 14 16:58:32 2024 +0200
runtime(termdebug): fix a few issues Fix a few minor issues: 1. filename with whitespaces issue should be fixed now, fixes: https://github.com/vim/vim/issues/12357 2. ":Termdebug args" should work now, fixes: #15254 closes: #15261 Signed-off-by: Christian Brabandt <c...@256bit.org> Signed-off-by: Ubaldo Tiberi <ubaldo.tib...@google.com> diff --git a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim index dc8b4adc3..58d526d6a 100644 --- a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim +++ b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim @@ -522,7 +522,7 @@ def CreateGdbConsole(dict: dict<any>, pty: string, commpty: string): string # ---- gdb started. Next, let's set the MI interface. --- # Set arguments to be run. - if len(proc_args) + if !empty(proc_args) term_sendkeys(gdbbufnr, $"server set args {join(proc_args)} ") endif @@ -1321,12 +1321,8 @@ def DeleteCommands() endif sign_unplace('TermDebug') - breakpoints = {} - breakpoint_locations = {} - sign_undefine('debugPC') sign_undefine(BreakpointSigns->map("'debugBreakpoint' .. v:val")) - BreakpointSigns = [] enddef @@ -1339,7 +1335,7 @@ def Until(at: string) ch_log('assume that program is running after this command') # Use the fname:lnum format - var AT = empty(at) ? $"{fnameescape(expand('%:p'))}:{line('.')}" : at + var AT = empty(at) ? $"\"{expand('%:p')}:{line('.')}\"" : at SendCommand($'-exec-until {AT}') else ch_log('dropping command, program is running: exec-until') @@ -1358,7 +1354,7 @@ def SetBreakpoint(at: string, tbreak=false) endif # Use the fname:lnum format, older gdb can't handle --source. - var AT = empty(at) ? $"{fnameescape(expand('%:p'))}:{line('.')}" : at + var AT = empty(at) ? $"\"{expand('%:p')}:{line('.')}\"" : at var cmd = '' if tbreak cmd = $'-break-insert -t {AT}' -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/E1sTxv5-0091K3-42%40256bit.org.