about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-11-26 01:10:08 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-11-26 01:10:08 +0000
commit121c60b9d6bb813623330b8f2cc69bb127552586 (patch)
tree8012dc8746b03322dd3d22e66c83779347a566a2
parent505c14ca0522dc4f5be90e7ed7c0efa60cfce91e (diff)
downloadzsh-121c60b9d6bb813623330b8f2cc69bb127552586.tar.gz
zsh-121c60b9d6bb813623330b8f2cc69bb127552586.tar.xz
zsh-121c60b9d6bb813623330b8f2cc69bb127552586.zip
zsh-workers/8782
-rw-r--r--Src/lex.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Src/lex.c b/Src/lex.c
index e97762326..db00aff40 100644
--- a/Src/lex.c
+++ b/Src/lex.c
@@ -1119,7 +1119,9 @@ gettokstr(int c, int sub)
 		}
 		ALLOWHIST
 		if (c != '\'') {
+		    lineno -= (c == '\n');
 		    zerr("unmatched \'", NULL, 0);
+		    lineno += (c == '\n');
 		    peek = LEXERR;
 		    cmdpop();
 		    goto brk;
@@ -1141,7 +1143,9 @@ gettokstr(int c, int sub)
 	    c = dquote_parse('"', sub);
 	    cmdpop();
 	    if (c) {
+		lineno -= (c == '\n');
 		zerr("unmatched \"", NULL, 0);
+		lineno += (c == '\n');
 		peek = LEXERR;
 		goto brk;
 	    }
@@ -1178,7 +1182,9 @@ gettokstr(int c, int sub)
 		ALLOWHIST
 	    cmdpop();
 	    if (c != '`') {
+		lineno -= (c == '\n');
 		zerr("unmatched `", NULL, 0);
+		lineno += (c == '\n');
 		peek = LEXERR;
 		goto brk;
 	    }