diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-07-14 08:17:49 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2024-07-14 13:39:40 +0800 |
commit | ba36742211eea55bed2ffbca129a45023967f204 (patch) | |
tree | 788badd75a8c8f673a0f4fa7e498112320388f01 /test | |
parent | 9093fbdd026f088d923fea374a96a8b01ca0df3a (diff) | |
download | rneovim-ba36742211eea55bed2ffbca129a45023967f204.tar.gz rneovim-ba36742211eea55bed2ffbca129a45023967f204.tar.bz2 rneovim-ba36742211eea55bed2ffbca129a45023967f204.zip |
vim-patch:9.1.0574: ex: wrong handling of commands after bar
Problem: ex: wrong handling of commands after bar
Solution: for :append, :insert and :change use the text after the bar
as input for those commands. This is what POSIX requests.
(Mohamed Akram)
See the POSIX Spec:
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/ex.html#tag_20_40_13_03
Section 12.c
closes: vim/vim#15229
https://github.com/vim/vim/commit/8c446da34998f6350911e07fbfd7932412c83185
Co-authored-by: Mohamed Akram <mohd.akram@outlook.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/old/testdir/test_ex_mode.vim | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/old/testdir/test_ex_mode.vim b/test/old/testdir/test_ex_mode.vim index 31615ec47d..622a591c98 100644 --- a/test/old/testdir/test_ex_mode.vim +++ b/test/old/testdir/test_ex_mode.vim @@ -293,4 +293,12 @@ func Test_implicit_print() bw! endfunc +" Test inserting text after the trailing bar +func Test_insert_after_trailing_bar() + new + call feedkeys("Qi|\nfoo\n.\na|bar\nbar\n.\nc|baz\n.", "xt") + call assert_equal(['', 'foo', 'bar', 'baz'], getline(1, '$')) + bwipe! +endfunc + " vim: shiftwidth=2 sts=2 expandtab |