* If both the '-t' and the '-c' option are given, the '-t' option is now

processed first, i.e. the command is executed at the position where the
  tag was found.
This commit is contained in:
Gunnar Ritter
2005-02-17 12:15:36 +00:00
parent 1dbb3c2a66
commit f99a42d652
3 changed files with 12 additions and 3 deletions

View File

@@ -73,7 +73,7 @@
#ifndef lint
#ifdef DOSCCS
static char sccsid[] = "@(#)ex_cmdsub.c 1.26 (gritter) 12/1/04";
static char sccsid[] = "@(#)ex_cmdsub.c 1.27 (gritter) 2/17/05";
#endif
#endif
@@ -560,6 +560,7 @@ tagfind(bool quick)
int owrapscan;
char *fn, *fne;
struct stat sbuf;
char *savefirstpat = NULL;
#ifdef FASTTAG
int ft_iof;
char ft_iofbuf[MAXBSIZE];
@@ -711,6 +712,8 @@ badtags:
if (strcmp(filebuf, savedfile) || !edited) {
char cmdbuf2[sizeof filebuf + 10];
savefirstpat = firstpat;
firstpat = NULL;
/* Different file. Do autowrite & get it. */
if (!quick) {
ckaw();
@@ -730,6 +733,7 @@ badtags:
if (tflag)
value(WRAPSCAN) = owrapscan;
samef = 0;
firstpat = savefirstpat;
}
/*
@@ -753,6 +757,8 @@ badtags:
value(MAGIC) = omagic;
if (tflag) {
value(WRAPSCAN) = owrapscan;
if (savefirstpat)
globp = savefirstpat;
tflag = 0;
}
return;