1
0
forked from aniani/vim

patch 9.1.0651: ex: trailing dot is optional for :g and :insert/:append

Problem:  ex: trailing dot is optional for :g and :insert/:append
Solution: don't break out early, when the next command is empty.
          (Mohamed Akram)

The terminating period is optional for the last command in a global
command list.

closes: #15407

Signed-off-by: Mohamed Akram <mohd.akram@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Mohamed Akram
2024-08-01 22:53:01 +02:00
committed by Christian Brabandt
parent e8feaa354e
commit 0214680a8e
3 changed files with 14 additions and 1 deletions

View File

@@ -378,4 +378,13 @@ func Test_insert_after_trailing_bar()
" 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
" Test global insert of a newline without terminating period
func Test_global_insert_newline()
new
call setline(1, ['foo'])
call feedkeys("Qg/foo/i\\\n", "xt")