Mercurial > vim
comparison runtime/pack/dist/opt/termdebug/plugin/termdebug.vim @ 14362:74470fae51f9 v8.1.0196
patch 8.1.0196: terminal debugger error with .gdbinit file
commit https://github.com/vim/vim/commit/f63db65b2418140d1bdbc032511f530234bd2496
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jul 19 04:13:36 2018 +0200
patch 8.1.0196: terminal debugger error with .gdbinit file
Problem: Terminal debugger error with .gdbinit file.
Solution: Check two lines for the "new ui" response. (hint from Hirohito
Higashi)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 19 Jul 2018 04:15:04 +0200 |
parents | e91659ae6614 |
children | 2f7e67dd088c |
comparison
equal
deleted
inserted
replaced
14361:0ea260db0c6e | 14362:74470fae51f9 |
---|---|
198 let try_count = 0 | 198 let try_count = 0 |
199 while 1 | 199 while 1 |
200 let response = '' | 200 let response = '' |
201 for lnum in range(1,200) | 201 for lnum in range(1,200) |
202 if term_getline(s:gdbbuf, lnum) =~ 'new-ui mi ' | 202 if term_getline(s:gdbbuf, lnum) =~ 'new-ui mi ' |
203 let response = term_getline(s:gdbbuf, lnum + 1) | 203 " response can be in the same line or the next line |
204 let response = term_getline(s:gdbbuf, lnum) . term_getline(s:gdbbuf, lnum + 1) | |
204 if response =~ 'Undefined command' | 205 if response =~ 'Undefined command' |
205 echoerr 'Sorry, your gdb is too old, gdb 7.12 is required' | 206 echoerr 'Sorry, your gdb is too old, gdb 7.12 is required' |
206 exe 'bwipe! ' . s:ptybuf | 207 exe 'bwipe! ' . s:ptybuf |
207 exe 'bwipe! ' . s:commbuf | 208 exe 'bwipe! ' . s:commbuf |
208 return | 209 return |