diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-04-10 07:33:26 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-10 07:33:26 +0800 |
commit | d52cc668c736ef6ca7ee3655a7eb7fe6475afadc (patch) | |
tree | 4dcad35062230be2b9095bc13a11d4d60157622a /test/old/testdir/test_prompt_buffer.vim | |
parent | 71225228fc2700a18c56c57f9dc14494cef83149 (diff) | |
download | rneovim-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/old/testdir/test_prompt_buffer.vim')
-rw-r--r-- | test/old/testdir/test_prompt_buffer.vim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/old/testdir/test_prompt_buffer.vim b/test/old/testdir/test_prompt_buffer.vim index 43d8bb4789..2cc3f19b59 100644 --- a/test/old/testdir/test_prompt_buffer.vim +++ b/test/old/testdir/test_prompt_buffer.vim @@ -271,6 +271,7 @@ func Test_prompt_appending_while_hidden() func DoAppend() call appendbufline('prompt', '$', 'Test') + return '' endfunc END call writefile(script, 'XpromptBuffer', 'D') @@ -283,11 +284,21 @@ func Test_prompt_appending_while_hidden() call term_sendkeys(buf, "exit\<CR>") call TermWait(buf) + call assert_notmatch('-- INSERT --', term_getline(buf, 10)) call term_sendkeys(buf, ":call DoAppend()\<CR>") call TermWait(buf) call assert_notmatch('-- INSERT --', term_getline(buf, 10)) + call term_sendkeys(buf, "i") + call TermWait(buf) + call assert_match('-- INSERT --', term_getline(buf, 10)) + + call term_sendkeys(buf, "\<C-R>=DoAppend()\<CR>") + call TermWait(buf) + call assert_match('-- INSERT --', term_getline(buf, 10)) + + call term_sendkeys(buf, "\<Esc>") call StopVimInTerminal(buf) endfunc |