# HG changeset patch # User Bram Moolenaar # Date 1567600203 -7200 # Node ID 58bebe21f0ef659594a21e3ea0e0734a3f0b94be # Parent aa9b5f329f97a40d3299de58a0d0e9843e2d0149 patch 8.1.1977: terminal debugger plugin may hang Commit: https://github.com/vim/vim/commit/19c8fe1925f4f7ffa1cc46e64d8bb8b1665ac437 Author: Bram Moolenaar Date: Wed Sep 4 14:24:24 2019 +0200 patch 8.1.1977: terminal debugger plugin may hang Problem: Terminal debugger plugin may hang. Solution: Wait longer when still reading symbols. diff --git a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim --- a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim +++ b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim @@ -225,10 +225,12 @@ func s:StartDebug_term(dict) endif let response = '' - for lnum in range(1,200) - if term_getline(s:gdbbuf, lnum) =~ 'new-ui mi ' + for lnum in range(1, 200) + let line1 = term_getline(s:gdbbuf, lnum) + let line2 = term_getline(s:gdbbuf, lnum + 1) + if line1 =~ 'new-ui mi ' " response can be in the same line or the next line - let response = term_getline(s:gdbbuf, lnum) . term_getline(s:gdbbuf, lnum + 1) + let response = line1 . line2 if response =~ 'Undefined command' echoerr 'Sorry, your gdb is too old, gdb 7.12 is required' call s:CloseBuffers() @@ -238,10 +240,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' diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -762,6 +762,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1977, +/**/ 1976, /**/ 1975,