diff options
author | Mohamed Akram <mohd.akram@outlook.com> | 2024-07-13 18:49:55 +0200 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2024-07-13 18:49:55 +0200 |
commit | 8c446da34998f6350911e07fbfd7932412c83185 (patch) | |
tree | 7663c3ba00d13b238aac9060fcfab4774e9a75b0 /src/testdir/test_ex_mode.vim | |
parent | c5e24ee24bc00981509170104dd0700fbc4669c0 (diff) |
patch 9.1.0574: ex: wrong handling of commands after barv9.1.0574
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: #15229
Signed-off-by: Mohamed Akram <mohd.akram@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'src/testdir/test_ex_mode.vim')
-rw-r--r-- | src/testdir/test_ex_mode.vim | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/testdir/test_ex_mode.vim b/src/testdir/test_ex_mode.vim index b0e5d81a82..c4f82d33ce 100644 --- a/src/testdir/test_ex_mode.vim +++ b/src/testdir/test_ex_mode.vim @@ -364,4 +364,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 |