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: #15229

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-07-13 18:49:55 +02:00
committed by Christian Brabandt
parent c5e24ee24b
commit 8c446da349
5 changed files with 33 additions and 3 deletions

View File

@ -1,4 +1,4 @@
*insert.txt* For Vim version 9.1. Last change: 2024 Jul 12
*insert.txt* For Vim version 9.1. Last change: 2024 Jul 13
VIM REFERENCE MANUAL by Bram Moolenaar
@ -1995,6 +1995,16 @@ These two commands will keep on asking for lines, until you type a line
containing only a ".". Watch out for lines starting with a backslash, see
|line-continuation|.
Text typed after a "|" command separator is used first. So the following
command in ex mode: >
:a|one
two
.
:visual
<appends the following text, after the cursor line: >
one
two
<
NOTE: These commands cannot be used with |:global| or |:vglobal|.
":append" and ":insert" don't work properly in between ":if" and
":endif", ":for" and ":endfor", ":while" and ":endwhile".