diff options
-rw-r--r-- | Src/lex.c | 6 |
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; } |