aboutsummaryrefslogtreecommitdiff
path: root/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/pack/dist/opt/termdebug/plugin/termdebug.vim')
-rw-r--r--runtime/pack/dist/opt/termdebug/plugin/termdebug.vim22
1 files changed, 21 insertions, 1 deletions
diff --git a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
index 2914e2bc4d..a80cb38b8d 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 May 18
+" Last Change: 2021 Aug 06
"
" WORK IN PROGRESS - Only the basics work
" Note: On MS-Windows you need a recent version of gdb. The one included with
@@ -127,6 +127,10 @@ func s:StartDebug_internal(dict)
let s:pid = 0
let s:asmwin = 0
+ if exists('#User#TermdebugStartPre')
+ doauto <nomodeline> User TermdebugStartPre
+ endif
+
" Uncomment this line to write logging in "debuglog".
" call ch_logfile('debuglog', 'w')
@@ -173,6 +177,10 @@ func s:StartDebug_internal(dict)
call win_gotoid(curwinid)
endif
endif
+
+ if exists('#User#TermdebugStartPost')
+ doauto <nomodeline> User TermdebugStartPost
+ endif
endfunc
" Use when debugger didn't start or ended.
@@ -623,6 +631,10 @@ func s:GetAsmAddr(msg)
endfunc
function s:EndTermDebug(job_id, exit_code, event)
+ if exists('#User#TermdebugStopPre')
+ doauto <nomodeline> User TermdebugStopPre
+ endif
+
unlet s:gdbwin
call s:EndDebugCommon()
@@ -657,10 +669,18 @@ func s:EndDebugCommon()
let &columns = s:save_columns
endif
+ if exists('#User#TermdebugStopPost')
+ doauto <nomodeline> User TermdebugStopPost
+ endif
+
au! TermDebug
endfunc
func s:EndPromptDebug(job_id, exit_code, event)
+ if exists('#User#TermdebugStopPre')
+ doauto <nomodeline> User TermdebugStopPre
+ endif
+
let curwinid = win_getid(winnr())
call win_gotoid(s:gdbwin)
close