aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/prompt_buffer_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-04-10 07:33:26 +0800
committerGitHub <noreply@github.com>2023-04-10 07:33:26 +0800
commitd52cc668c736ef6ca7ee3655a7eb7fe6475afadc (patch)
tree4dcad35062230be2b9095bc13a11d4d60157622a /test/functional/legacy/prompt_buffer_spec.lua
parent71225228fc2700a18c56c57f9dc14494cef83149 (diff)
downloadrneovim-d52cc668c736ef6ca7ee3655a7eb7fe6475afadc.tar.gz
rneovim-d52cc668c736ef6ca7ee3655a7eb7fe6475afadc.tar.bz2
rneovim-d52cc668c736ef6ca7ee3655a7eb7fe6475afadc.zip
vim-patch:9.0.1443: ending Insert mode when accessing a hidden prompt buffer (#22984)
Problem: Ending Insert mode when accessing a hidden prompt buffer. Solution: Don't stop Insert mode when it was active before. (closes vim/vim#12237) https://github.com/vim/vim/commit/05a627c3d4e42a18f76c14828d68ee4747118211 Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'test/functional/legacy/prompt_buffer_spec.lua')
-rw-r--r--test/functional/legacy/prompt_buffer_spec.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/functional/legacy/prompt_buffer_spec.lua b/test/functional/legacy/prompt_buffer_spec.lua
index 6c72cde855..5c3f8a6f8c 100644
--- a/test/functional/legacy/prompt_buffer_spec.lua
+++ b/test/functional/legacy/prompt_buffer_spec.lua
@@ -247,6 +247,7 @@ describe('prompt buffer', function()
func DoAppend()
call appendbufline('prompt', '$', 'Test')
+ return ''
endfunc
]])
feed('asomething<CR>')
@@ -254,7 +255,12 @@ describe('prompt buffer', function()
neq(prev_win, meths.get_current_win())
feed('exit<CR>')
eq(prev_win, meths.get_current_win())
+ eq({ mode = 'n', blocking = false }, meths.get_mode())
command('call DoAppend()')
eq({ mode = 'n', blocking = false }, meths.get_mode())
+ feed('i')
+ eq({ mode = 'i', blocking = false }, meths.get_mode())
+ command('call DoAppend()')
+ eq({ mode = 'i', blocking = false }, meths.get_mode())
end)
end)