mirror of
https://github.com/neovim/neovim.git
synced 2025-10-21 17:21:49 +00:00
Reset stop_insert_mode in terminal_enter rather than terminal_check
Problem: Using `:stopinsert` while in normal mode in a terminal buffer prevents neovim from entering insert mode. Solution: Move `stop_insert_mode = false` from terminal_check to terminal_enter to be consistent with edit.c, as suggested by bfredl in #9889. Closes https://github.com/neovim/neovim/issues/9889.
This commit is contained in:
@@ -106,6 +106,15 @@ describe(':terminal', function()
|
||||
command('stopinsert')
|
||||
eq({ blocking=false, mode='n' }, nvim('get_mode'))
|
||||
end)
|
||||
|
||||
it(':stopinsert in normal mode doesn\'t break insert mode #9889', function()
|
||||
command(':terminal')
|
||||
eq({ blocking=false, mode='n' }, nvim('get_mode'))
|
||||
command(':stopinsert')
|
||||
eq({ blocking=false, mode='n' }, nvim('get_mode'))
|
||||
feed('a')
|
||||
eq({ blocking=false, mode='t' }, nvim('get_mode'))
|
||||
end)
|
||||
end)
|
||||
|
||||
describe(':terminal (with fake shell)', function()
|
||||
|
Reference in New Issue
Block a user