diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-07-14 16:28:05 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2024-07-14 16:33:07 +0800 |
commit | c8401515cdaad20220e30f5a0c39ddb7bae77f5e (patch) | |
tree | b4532a00a60eefe2aee77e7bdbf7ef1eb769c9da /test/old/testdir | |
parent | ba36742211eea55bed2ffbca129a45023967f204 (diff) | |
download | rneovim-c8401515cdaad20220e30f5a0c39ddb7bae77f5e.tar.gz rneovim-c8401515cdaad20220e30f5a0c39ddb7bae77f5e.tar.bz2 rneovim-c8401515cdaad20220e30f5a0c39ddb7bae77f5e.zip |
vim-patch:9.1.0582: Printed line doesn't overwrite colon when pressing Enter in Ex mode
Problem: Printed line no longer overwrites colon when pressing Enter in
Ex mode (after 9.1.0573).
Solution: Restore the behavior of pressing Enter in Ex mode.
(zeertzjq)
closes: vim/vim#15258
https://github.com/vim/vim/commit/7d664bf0eb2cb25cb77933c8b7f11ca09929e7b8
Diffstat (limited to 'test/old/testdir')
-rw-r--r-- | test/old/testdir/test_ex_mode.vim | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/test/old/testdir/test_ex_mode.vim b/test/old/testdir/test_ex_mode.vim index 622a591c98..f55ba87a3e 100644 --- a/test/old/testdir/test_ex_mode.vim +++ b/test/old/testdir/test_ex_mode.vim @@ -69,7 +69,7 @@ func Test_Ex_substitute() CheckRunVimInTerminal let buf = RunVimInTerminal('', {'rows': 6}) - call term_sendkeys(buf, ":call setline(1, ['foo foo', 'foo foo', 'foo foo'])\<CR>") + call term_sendkeys(buf, ":call setline(1, repeat(['foo foo'], 4))\<CR>") call term_sendkeys(buf, ":set number\<CR>") call term_sendkeys(buf, "gQ") call WaitForAssert({-> assert_match(':', term_getline(buf, 6))}, 1000) @@ -91,8 +91,14 @@ func Test_Ex_substitute() " Pressing enter in ex mode should print the current line call term_sendkeys(buf, "\<CR>") - call WaitForAssert({-> assert_match(' 3 foo foo', - \ term_getline(buf, 5))}, 1000) + call WaitForAssert({-> assert_match(' 3 foo foo', term_getline(buf, 5))}, 1000) + call WaitForAssert({-> assert_match(':', term_getline(buf, 6))}, 1000) + + " The printed line should overwrite the colon + call term_sendkeys(buf, "\<CR>") + call WaitForAssert({-> assert_match(' 3 foo foo', term_getline(buf, 4))}, 1000) + call WaitForAssert({-> assert_match(' 4 foo foo', term_getline(buf, 5))}, 1000) + call WaitForAssert({-> assert_match(':', term_getline(buf, 6))}, 1000) call term_sendkeys(buf, ":vi\<CR>") call WaitForAssert({-> assert_match('foo bar', term_getline(buf, 1))}, 1000) |