diff options
| author | Christian Clason <c.clason@uni-graz.at> | 2021-11-08 00:10:44 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-08 00:10:44 +0100 |
| commit | 8cbe100fcc9c5d34b07f417a82b745803fa3ef19 (patch) | |
| tree | f859abc6bc58bc21db11d0bf9633b7f31fe48cf6 /runtime/pack/dist/opt/termdebug/plugin/termdebug.vim | |
| parent | 16d4af6d2f549709aa55510f5ae52238c5cadb9c (diff) | |
| download | rneovim-8cbe100fcc9c5d34b07f417a82b745803fa3ef19.tar.gz rneovim-8cbe100fcc9c5d34b07f417a82b745803fa3ef19.tar.bz2 rneovim-8cbe100fcc9c5d34b07f417a82b745803fa3ef19.zip | |
vim-patch:partial 113cb513f76d (#16260)
Update runtime files
https://github.com/vim/vim/commit/113cb513f76d8866cbb6dc85fa18aded753e01da
skip doc/eval.txt
skip doc/insert.txt
skip doc/user_06.txt (needs 8.2.3562)
partial skip doc/syntax.txt (needs 8.2.3562)
Diffstat (limited to 'runtime/pack/dist/opt/termdebug/plugin/termdebug.vim')
| -rw-r--r-- | runtime/pack/dist/opt/termdebug/plugin/termdebug.vim | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim index 8057d7f284..8de03dfab7 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 Aug 23 +" Last Change: 2021 Oct 26 " " WORK IN PROGRESS - Only the basics work " Note: On MS-Windows you need a recent version of gdb. The one included with @@ -550,7 +550,7 @@ func s:GdbOutCallback(job_id, msgs, event) let index = 0 for msg in a:msgs - if msg =~ '^^error,msg=' + if msg =~ '^\^error,msg=' if exists('s:evalexpr') \ && s:DecodeMessage(msg[11:]) \ =~ 'A syntax error in expression, near\|No symbol .* in current context' @@ -746,8 +746,8 @@ func s:HandleDisasmMsg(msg) else let value = substitute(a:msg, '^\~\"[ ]*', '', '') let value = substitute(value, '^=>[ ]*', '', '') - let value = substitute(value, '\\n\"
$', '', '') - let value = substitute(value, '
', '', '') + let value = substitute(value, '\\n\"\r$', '', '') + let value = substitute(value, '\r', '', '') let value = substitute(value, '\\t', ' ', 'g') if value != '' || !empty(s:asm_lines) @@ -965,8 +965,22 @@ func s:Run(args) endfunc func s:SendEval(expr) - call s:SendCommand('-data-evaluate-expression "' . a:expr . '"') - let s:evalexpr = a:expr + " clean up expression that may got in because of range + " (newlines and surrounding spaces) + let expr = a:expr + if &filetype ==# 'cobol' + " extra cleanup for COBOL: _every: expression ends with a period, + " a trailing comma is ignored as it commonly separates multiple expr. + let expr = substitute(expr, '\..*', '', '') + let expr = substitute(expr, '[;\n]', ' ', 'g') + let expr = substitute(expr, ',*$', '', '') + else + let expr = substitute(expr, '\n', ' ', 'g') + endif + let expr = substitute(expr, '^ *\(.*\) *', '\1', '') + + call s:SendCommand('-data-evaluate-expression "' . expr . '"') + let s:evalexpr = expr endfunc " :Evaluate - evaluate what is under the cursor @@ -1151,7 +1165,8 @@ func s:HandleError(msg) let s:evalFromBalloonExpr = 0 return endif - echoerr substitute(a:msg, '.*msg="\(.*\)"', '\1', '') + let msgVal = substitute(a:msg, '.*msg="\(.*\)"', '\1', '') + echoerr substitute(msgVal, '\\"', '"', 'g') endfunc func s:GotoSourcewinOrCreateIt() |