1
0
forked from aniani/vim

patch 8.2.3461: cannot distinguish Normal and Terminal-Normal mode

Problem:    Cannot distinguish Normal and Terminal-Normal mode.
Solution:   Make mode() return "nt" for Terminal-Normal mode. (issue #8856)
This commit is contained in:
Bram Moolenaar
2021-10-02 16:34:55 +01:00
parent dfa5e464d4
commit 72406a4bd2
4 changed files with 16 additions and 1 deletions

View File

@@ -874,6 +874,14 @@ func Test_mode()
call assert_equal('c-ce', g:current_modes)
" How to test Ex mode?
if has('terminal')
term
call feedkeys("\<C-W>N", 'xt')
call assert_equal('n', mode())
call assert_equal('nt', mode(1))
call feedkeys("aexit\<CR>", 'xt')
endif
bwipe!
iunmap <F2>
xunmap <F2>