diff options
| author | Matthieu Coudron <mattator@gmail.com> | 2020-06-22 22:40:33 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-22 22:40:33 +0200 |
| commit | 8f30753aa1398eadecf1bd9f6dc71251218b9b2d (patch) | |
| tree | 9572999548caca5b79f2c028e88a5cbc1db97319 /runtime/pack/dist/opt/termdebug/plugin/termdebug.vim | |
| parent | 21453e8f09b72751d396858b9ea86c0584fd6c89 (diff) | |
| parent | b198225361dd87161c494627dfebb3d9ffd6cf5a (diff) | |
| download | rneovim-8f30753aa1398eadecf1bd9f6dc71251218b9b2d.tar.gz rneovim-8f30753aa1398eadecf1bd9f6dc71251218b9b2d.tar.bz2 rneovim-8f30753aa1398eadecf1bd9f6dc71251218b9b2d.zip | |
Merge pull request #12455 from janlazo/vim-8.0.1554
[RDY]vim-patch:8.0.1554,8.1.1977,8.2.{927,930,932,938,954,963,964,966,980,983,998,999}
Diffstat (limited to 'runtime/pack/dist/opt/termdebug/plugin/termdebug.vim')
| -rw-r--r-- | runtime/pack/dist/opt/termdebug/plugin/termdebug.vim | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim index 28dc3256c7..2898bd991b 100644 --- a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim +++ b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim @@ -247,10 +247,12 @@ func s:StartDebug_term(dict) endif let response = '' - for lnum in range(1,200) - if len(getbufline(s:gdbbuf, lnum)) > 0 && getbufline(s:gdbbuf, lnum)[0] =~ 'new-ui mi ' + for lnum in range(1, 200) + let line1 = get(getbufline(s:gdbbuf, lnum), 0, '') + let line2 = get(getbufline(s:gdbbuf, lnum + 1), 0, '') + if line1 =~ 'new-ui mi ' " response can be in the same line or the next line - let response = getbufline(s:gdbbuf, lnum)[0] . getbufline(s:gdbbuf, lnum + 1)[0] + let response = line1 . line2 if response =~ 'Undefined command' echoerr 'Sorry, your gdb is too old, gdb 7.12 is required' call s:CloseBuffers() @@ -260,10 +262,9 @@ func s:StartDebug_term(dict) " Success! break endif - if response =~ 'Reading symbols from' && response !~ 'new-ui' - " Reading symbols might take a while - let try_count -= 1 - endif + elseif line1 =~ 'Reading symbols from' && line2 !~ 'new-ui mi ' + " Reading symbols might take a while, try more times + let try_count -= 1 endif endfor if response =~ 'New UI allocated' |