aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/ex_cmds2.c2
-rw-r--r--src/nvim/globals.h3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/nvim/ex_cmds2.c b/src/nvim/ex_cmds2.c
index df23d0630a..691ad74100 100644
--- a/src/nvim/ex_cmds2.c
+++ b/src/nvim/ex_cmds2.c
@@ -159,6 +159,7 @@ void do_debug(char_u *cmd)
redir_off = true; // don't redirect debug commands
State = NORMAL;
+ debug_mode = true;
if (!debug_did_msg) {
MSG(_("Entering Debug mode. Type \"cont\" to continue."));
@@ -337,6 +338,7 @@ void do_debug(char_u *cmd)
msg_scroll = save_msg_scroll;
lines_left = (int)(Rows - 1);
State = save_State;
+ debug_mode = false;
did_emsg = save_did_emsg;
cmd_silent = save_cmd_silent;
msg_silent = save_msg_silent;
diff --git a/src/nvim/globals.h b/src/nvim/globals.h
index 82fc7c1218..ad321963fe 100644
--- a/src/nvim/globals.h
+++ b/src/nvim/globals.h
@@ -655,9 +655,10 @@ EXTERN char_u *fenc_default INIT(= NULL);
/// finish_op : When State is NORMAL, after typing the operator and
/// before typing the motion command.
/// motion_force: Last motion_force from do_pending_operator()
+/// debug_mode: Debug mode
EXTERN int State INIT(= NORMAL); // This is the current state of the
// command interpreter.
-
+EXTERN bool debug_mode INIT(= false);
EXTERN bool finish_op INIT(= false); // true while an operator is pending
EXTERN long opcount INIT(= 0); // count for pending operator
EXTERN int motion_force INIT(=0); // motion force for pending operator