Use \; at top level also.

This commit is contained in:
Nicholas Marriott
2026-07-01 12:32:51 +01:00
parent 111a11ac6a
commit 80b1f20e7d
2 changed files with 4 additions and 4 deletions

View File

@@ -1174,9 +1174,9 @@ cmd_parse_print_string(char **buf, struct cmd_parse_node *string)
}
static const char *
cmd_parse_print_separator(u_int depth, int flags)
cmd_parse_print_separator(u_int depth)
{
if ((~flags & CMD_PARSE_PRINT_MULTILINE) && depth == 0)
if (depth == 0)
return (" \\; ");
return (" ; ");
}
@@ -1318,7 +1318,7 @@ cmd_parse_print_sequence(char **buf, struct cmd_parse_node *seq, u_int depth,
int flags)
{
struct cmd_parse_node *child, *first_child;
const char *sep = cmd_parse_print_separator(depth, flags);
const char *sep = cmd_parse_print_separator(depth);
int first = 1;
/*

View File

@@ -62,7 +62,7 @@ bind-key -T parsetest b display-message 'hello world'
bind-key -T parsetest c display-message 'literal $HOME #{p} ~'
bind-key -T parsetest d display-message ''
bind-key -T parsetest e display-message '#{pane_id}'
bind-key -T parsetest f display-message a ; display-message b
bind-key -T parsetest f display-message a \; display-message b
bind-key -T parsetest g display-message one
display-message two
bind-key -T parsetest h if-shell true {