Introduction
Introduction Statistics Contact Development Disclaimer Help
tex: handle variants of substitute command in ex_arg() - neatvi - [fork] simple…
git clone git://src.adamsgaard.dk/neatvi
Log
Files
Refs
README
---
commit 16eb081e786b544797606b0d0e8d4393c32b13ff
parent 1a5dcfa46dc0770bfe79f8f3ef2e5990b1fe98b9
Author: Ali Gholami Rudi <[email protected]>
Date: Fri, 26 Nov 2021 21:19:14 +0330
ex: handle variants of substitute command in ex_arg()
Diffstat:
M ex.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/ex.c b/ex.c
t@@ -912,6 +912,7 @@ static char *ex_cmd(char *src, char *cmd)
static char *ex_arg(char *src, char *dst, char *excmd)
{
int c0 = excmd[0];
+ int c1 = excmd[1];
while (*src == ' ' || *src == '\t')
src++;
if (c0 == '!' || c0 == 'g' || c0 == 'v' ||
t@@ -921,7 +922,7 @@ static char *ex_arg(char *src, char *dst, char *excmd)
*dst++ = *src++;
*dst++ = *src++;
}
- } else if (c0 == 's') {
+ } else if ((c0 == 's' && c1 != 'e') || c0 == '&' || c0 == '~') {
int delim = *src;
int cnt = 2;
*dst++ = *src++;
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.