mirror of
https://github.com/tmux/tmux.git
synced 2025-12-19 00:02:06 -05:00
Fix list-keys output for commands with different groups
When commands in braces span multiple lines, they get assigned to different groups. The cmd_list_print() function was outputting \;\; to separate commands with different groups, but this syntax is not understood by the parser. Change to always use \; as the separator regardless of group, making the output valid syntax that can be re-parsed. Fixes #3455
This commit is contained in:
parent
ef0a7e328c
commit
d1ec48d067
15
cmd.c
15
cmd.c
@ -695,17 +695,10 @@ cmd_list_print(const struct cmd_list *cmdlist, int escaped)
|
||||
|
||||
next = TAILQ_NEXT(cmd, qentry);
|
||||
if (next != NULL) {
|
||||
if (cmd->group != next->group) {
|
||||
if (escaped)
|
||||
strlcat(buf, " \\;\\; ", len);
|
||||
else
|
||||
strlcat(buf, " ;; ", len);
|
||||
} else {
|
||||
if (escaped)
|
||||
strlcat(buf, " \\; ", len);
|
||||
else
|
||||
strlcat(buf, " ; ", len);
|
||||
}
|
||||
if (escaped)
|
||||
strlcat(buf, " \\; ", len);
|
||||
else
|
||||
strlcat(buf, " ; ", len);
|
||||
}
|
||||
|
||||
free(this);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user