aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/windows.txt8
-rw-r--r--runtime/pack/dist/opt/termdebug/plugin/termdebug.vim11
2 files changed, 13 insertions, 6 deletions
diff --git a/runtime/doc/windows.txt b/runtime/doc/windows.txt
index 76bb096ee3..977e0daef7 100644
--- a/runtime/doc/windows.txt
+++ b/runtime/doc/windows.txt
@@ -201,9 +201,11 @@ CTRL-W CTRL_N *CTRL-W_CTRL-N*
|:find|. Doesn't split if {file} is not found.
CTRL-W CTRL-^ *CTRL-W_CTRL-^* *CTRL-W_^*
-CTRL-W ^ Does ":split #", split window in two and edit alternate file.
- When a count is given, it becomes ":split #N", split window
- and edit buffer N.
+CTRL-W ^ Split the current window in two and edit the alternate file.
+ When a count N is given, split the current window and edit
+ buffer N. Similar to ":sp #" and ":sp #N", but it allows the
+ other buffer to be unnamed. This command matches the behavior
+ of |CTRL-^|, except that it splits a window first.
CTRL-W ge *CTRL-W_ge*
Detach the current window as an external window.
diff --git a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
index a97461ad69..52b4829f5f 100644
--- a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
+++ b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
@@ -67,8 +67,8 @@ command -nargs=* -complete=file -bang Termdebug call s:StartDebug(<bang>0, <f-ar
command -nargs=+ -complete=file -bang TermdebugCommand call s:StartDebugCommand(<bang>0, <f-args>)
" Name of the gdb command, defaults to "gdb".
-if !exists('termdebugger')
- let termdebugger = 'gdb'
+if !exists('g:termdebugger')
+ let g:termdebugger = 'gdb'
endif
let s:pc_id = 12
@@ -106,9 +106,14 @@ endfunc
func s:StartDebug_internal(dict)
if exists('s:gdbwin')
- echoerr 'Terminal debugger already running'
+ echoerr 'Terminal debugger already running, cannot run two'
return
endif
+ if !executable(g:termdebugger)
+ echoerr 'Cannot execute debugger program "' .. g:termdebugger .. '"'
+ return
+ endif
+
let s:ptywin = 0
let s:pid = 0