aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/doc/eval.txt1
-rw-r--r--src/nvim/eval.c2
2 files changed, 3 insertions, 0 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 5f572e9caa..710793fb04 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -4602,6 +4602,7 @@ mode([expr]) Return a string that indicates the current mode.
i Insert
R Replace |R|
Rv Virtual Replace |gR|
+ t Terminal {Nvim}
c Command-line
cv Vim Ex mode |gQ|
ce Normal Ex mode |Q|
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index 3b1b034b33..deeca10310 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -11769,6 +11769,8 @@ static void f_mode(typval_T *argvars, typval_T *rettv)
} else if (exmode_active) {
buf[0] = 'c';
buf[1] = 'e';
+ } else if (State & TERM_FOCUS) {
+ buf[0] = 't';
} else {
buf[0] = 'n';
if (finish_op)