diff options
author | glacambre <code@lacamb.re> | 2019-04-08 01:13:43 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-04-08 01:13:43 +0200 |
commit | d928b036dc2be8f043545c0d7e2a2b2285528aaa (patch) | |
tree | c8182e15649721cdb6d2be68439cfcee02253f9f /test/functional/terminal/ex_terminal_spec.lua | |
parent | 11bf89e3b58be1dd534b4ea49b1988150cf7d4b8 (diff) | |
download | rneovim-d928b036dc2be8f043545c0d7e2a2b2285528aaa.tar.gz rneovim-d928b036dc2be8f043545c0d7e2a2b2285528aaa.tar.bz2 rneovim-d928b036dc2be8f043545c0d7e2a2b2285528aaa.zip |
:stopinsert should leave terminal-mode #9856
Problem: Calling :stopinsert from RPC while in terminal-mode does not
go back to normal-mode.
Solution: Implement a check() handler for state_enter(), adapted from
insert_check().
Fix #7807
Diffstat (limited to 'test/functional/terminal/ex_terminal_spec.lua')
-rw-r--r-- | test/functional/terminal/ex_terminal_spec.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/functional/terminal/ex_terminal_spec.lua b/test/functional/terminal/ex_terminal_spec.lua index dbee9bdb49..ca5737db7f 100644 --- a/test/functional/terminal/ex_terminal_spec.lua +++ b/test/functional/terminal/ex_terminal_spec.lua @@ -99,6 +99,13 @@ describe(':terminal', function() eq(3, #jumps) end) + it(':stopinsert RPC request exits terminal-mode #7807', function() + command(':terminal') + feed('i[tui] insert-mode') + eq({ blocking=false, mode='t' }, nvim('get_mode')) + command('stopinsert') + eq({ blocking=false, mode='n' }, nvim('get_mode')) + end) end) describe(':terminal (with fake shell)', function() |