diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-10-02 16:34:55 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-10-02 16:34:55 +0100 |
commit | 72406a4bd2896915b6f541e26d41521a59b1f846 (patch) | |
tree | 8eefa9728408e73f4742c4f079ab4cd7f96f84e1 /src/misc1.c | |
parent | dfa5e464d459f84200a73d178f1ecefe75bbe511 (diff) |
patch 8.2.3461: cannot distinguish Normal and Terminal-Normal modev8.2.3461
Problem: Cannot distinguish Normal and Terminal-Normal mode.
Solution: Make mode() return "nt" for Terminal-Normal mode. (issue #8856)
Diffstat (limited to 'src/misc1.c')
-rw-r--r-- | src/misc1.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/misc1.c b/src/misc1.c index 1dd07f9067..b4a4a8cc75 100644 --- a/src/misc1.c +++ b/src/misc1.c @@ -712,6 +712,10 @@ f_mode(typval_T *argvars, typval_T *rettv) buf[1] = 'i'; buf[2] = restart_edit; } +#ifdef FEAT_TERMINAL + else if (term_in_normal_mode()) + buf[1] = 't'; +#endif } // Clear out the minor mode when the argument is not a non-zero number or |