made -t foo -c bar work in visual mode too

This commit is contained in:
Gunnar Ritter 2005-02-17 21:11:34 +00:00
parent ebbbfc8bd2
commit 057434f01a
2 changed files with 13 additions and 7 deletions

View File

@ -73,7 +73,7 @@
#ifndef lint #ifndef lint
#ifdef DOSCCS #ifdef DOSCCS
static char sccsid[] = "@(#)ex_cmdsub.c 1.28 (gritter) 2/17/05"; static char sccsid[] = "@(#)ex_cmdsub.c 1.29 (gritter) 2/17/05";
#endif #endif
#endif #endif
@ -733,7 +733,7 @@ badtags:
peekc = d; peekc = d;
globp = oglobp; globp = oglobp;
value(MAGIC) = omagic; value(MAGIC) = omagic;
if (tflag) if (tflag > 0)
value(WRAPSCAN) = owrapscan; value(WRAPSCAN) = owrapscan;
samef = 0; samef = 0;
firstpat = savefirstpat; firstpat = savefirstpat;
@ -752,17 +752,19 @@ badtags:
* line) we get left in nomagic mode. * line) we get left in nomagic mode.
*/ */
value(MAGIC) = 0; value(MAGIC) = 0;
if (tflag) if (tflag > 0)
value(WRAPSCAN) = 1; value(WRAPSCAN) = 1;
commands(1, 1); commands(1, 1);
failed = ofailed; failed = ofailed;
peekc = d; peekc = d;
globp = oglobp; globp = oglobp;
value(MAGIC) = omagic; value(MAGIC) = omagic;
if (tflag) { if (tflag > 0) {
value(WRAPSCAN) = owrapscan; value(WRAPSCAN) = owrapscan;
if (savefirstpat) if (savefirstpat) {
globp = savefirstpat; globp = savefirstpat;
tflag = -1;
} else
tflag = 0; tflag = 0;
} }
return; return;

View File

@ -73,7 +73,7 @@
#ifndef lint #ifndef lint
#ifdef DOSCCS #ifdef DOSCCS
static char sccsid[] = "@(#)ex_vmain.c 1.28 (gritter) 11/28/04"; static char sccsid[] = "@(#)ex_vmain.c 1.29 (gritter) 2/17/05";
#endif #endif
#endif #endif
@ -1033,6 +1033,10 @@ doinit:
Pline = OPline; Pline = OPline;
Putchar = OPutchar; Putchar = OPutchar;
ungetchar(d); ungetchar(d);
if (globp && tflag < 0) {
tflag = 0;
goto doinit;
}
globp = oglobp; globp = oglobp;
/* /*