Create new mode() value for terminal-mode ('t') #2287

This commit is contained in:
Harm te Hennepe 2015-03-28 19:38:59 +01:00 committed by Justin M. Keyes
parent 960b9108c2
commit 27ead64da0
2 changed files with 3 additions and 0 deletions

View File

@ -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|

View File

@ -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)