=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/cmd-parse.y,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- src/usr.bin/tmux/cmd-parse.y 2019/05/29 10:08:36 1.7 +++ src/usr.bin/tmux/cmd-parse.y 2019/05/29 19:34:42 1.8 @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-parse.y,v 1.7 2019/05/29 10:08:36 nicm Exp $ */ +/* $OpenBSD: cmd-parse.y,v 1.8 2019/05/29 19:34:42 nicm Exp $ */ /* * Copyright (c) 2019 Nicholas Marriott @@ -58,6 +58,7 @@ size_t len; size_t off; + int eol; int eof; struct cmd_parse_input *input; u_int escapes; @@ -933,6 +934,10 @@ char *token, *cp; int ch, next; + if (ps->eol) + ps->input->line++; + ps->eol = 0; + for (;;) { ch = yylex_getc(); @@ -959,7 +964,7 @@ /* * End of line. Update the line number. */ - ps->input->line++; + ps->eol = 1; return ('\n'); }