diff options
Diffstat (limited to 'runtime/pack/dist/opt/termdebug/plugin/termdebug.vim')
-rw-r--r-- | runtime/pack/dist/opt/termdebug/plugin/termdebug.vim | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim index 15d0397198..a1c92ba0b7 100644 --- a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim +++ b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim @@ -328,14 +328,14 @@ enddef # Use when debugger didn't start or ended. def CloseBuffers() - exe $'bwipe! {ptybufnr}' - exe $'bwipe! {commbufnr}' - if asmbufnr > 0 && bufexists(asmbufnr) - exe $'bwipe! {asmbufnr}' - endif - if varbufnr > 0 && bufexists(varbufnr) - exe $'bwipe! {varbufnr}' - endif + var bufnames = ['debugged\ program', 'gdb\ communication', asmbufname, varbufname] + for bufname in bufnames + var buf_nr = bufnr(bufname) + if buf_nr > 0 && bufexists(buf_nr) + exe $'bwipe! {bufname}' + endif + endfor + running = 0 gdbwin = 0 enddef |