forked from aniani/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: #15229 Signed-off-by: Mohamed Akram <mohd.akram@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
c5e24ee24b
commit
8c446da349
@@ -3360,7 +3360,13 @@ ex_append(exarg_T *eap)
|
||||
indent = get_indent_lnum(lnum);
|
||||
}
|
||||
ex_keep_indent = FALSE;
|
||||
if (eap->ea_getline == NULL)
|
||||
if (*eap->arg == '|')
|
||||
{
|
||||
// Get the text after the trailing bar.
|
||||
theline = vim_strsave(eap->arg + 1);
|
||||
*eap->arg = NUL;
|
||||
}
|
||||
else if (eap->ea_getline == NULL)
|
||||
{
|
||||
// No getline() function, use the lines that follow. This ends
|
||||
// when there is no more.
|
||||
|
Reference in New Issue
Block a user