summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2020-12-01 10:48:04 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2020-12-01 10:48:04 +0000
commita317ca6fcad34e513c5367dbcb10fe0b06794e50 (patch)
tree108639e48eed282196f0cb9d423996c264ae6a5a /usr.bin
parent57d2c1fd5cdca4ac739f2e7b627a74ad565c8ae4 (diff)
Leave newlines inside multiline quotes.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/tmux/cmd-parse.y8
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.bin/tmux/cmd-parse.y b/usr.bin/tmux/cmd-parse.y
index 2c701ba7706..86f987a85e2 100644
--- a/usr.bin/tmux/cmd-parse.y
+++ b/usr.bin/tmux/cmd-parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-parse.y,v 1.31 2020/07/13 10:10:10 nicm Exp $ */
+/* $OpenBSD: cmd-parse.y,v 1.32 2020/12/01 10:48:03 nicm Exp $ */
/*
* Copyright (c) 2019 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -1505,8 +1505,12 @@ yylex_token(int ch)
state == NONE)
break;
- /* Spaces and comments inside quotes after \n are removed. */
+ /*
+ * Spaces and comments inside quotes after \n are removed but
+ * the \n is left.
+ */
if (ch == '\n' && state != NONE) {
+ yylex_append1(&buf, &len, '\n');
while ((ch = yylex_getc()) == ' ' || ch == '\t')
/* nothing */;
if (ch != '#')