mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
: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
This commit is contained in:
committed by
Justin M. Keyes
parent
11bf89e3b5
commit
d928b036dc
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user