diff --git a/Changes b/Changes index 55ae250..24ede1d 100644 --- a/Changes +++ b/Changes @@ -12,6 +12,7 @@ Release ... * The insertion of multicolumn characters and tab characters in multibyte locales now works with terminals that have the 'ic' but no 'im' termcap capability (Bugreport by Matthew Fischer). +* The argument to the -w option is correctly recognized now. Release 1/19/05 * The last release erroneously made 'X' work like 'x' in visual mode. It now diff --git a/ex.c b/ex.c index ed30d60..c01ba77 100644 --- a/ex.c +++ b/ex.c @@ -77,7 +77,7 @@ char *copyright = "@(#) Copyright (c) 1980 Regents of the University of California.\n\ All rights reserved.\n"; -static char sccsid[] = "@(#)ex.c 1.34 (gritter) 12/1/04"; +static char sccsid[] = "@(#)ex.c 1.35 (gritter) 2/13/05"; #endif /* DOSCCS */ #endif /* !lint */ @@ -467,13 +467,13 @@ arggroup: break; case 't': - if (ac > 1 && av[1][0] != '-' && av[1][0] != '+') { - ac--, av++; + if (av[0][2]) { tflag = 1; safecp(lasttag, av[0], sizeof lasttag, "argument to -t too long"); - } - else if (av[0][2]) { + } else if (ac > 1 && av[1][0] != '-' && + av[1][0] != '+') { + ac--, av++; tflag = 1; safecp(lasttag, av[0], sizeof lasttag, "argument to -t too long"); @@ -490,11 +490,12 @@ arggroup: break; case 'w': - if (ac > 1 && av[1][0] != '-' && av[1][0] != '+') - cp = av[1]; - else if (av[0][2]) + if (av[0][2]) cp = &av[0][2]; - else + else if (ac > 1 && av[1][0] != '-' && av[1][0] != '+') { + cp = av[1]; + ac--, av++; + } else needarg('w'); defwind = atoi(cp); break; diff --git a/ex_version.c b/ex_version.c index b92ed48..ed22851 100644 --- a/ex_version.c +++ b/ex_version.c @@ -70,12 +70,12 @@ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * Sccsid @(#)ex_version.c 1.122 (gritter) 2/4/05 + * Sccsid @(#)ex_version.c 1.123 (gritter) 2/13/05 */ #include "ex.h" -static char *versionstring = "@(#)Version 4.0 (gritter) 2/4/05"; +static char *versionstring = "@(#)Version 4.0 (gritter) 2/13/05"; void printver(void)