It is silly for cmd_list_parse to return an integer error when it could

just return NULL.
This commit is contained in:
nicm
2017-01-15 22:00:56 +00:00
parent 3054846143
commit 52847a9518
11 changed files with 31 additions and 45 deletions

View File

@ -90,7 +90,8 @@ cmd_display_panes_callback(struct client *c, struct window_pane *wp)
xasprintf(&expanded, "%%%u", wp->id);
cmd = cmd_template_replace(template, expanded, 1);
if (cmd_string_parse(cmd, &cmdlist, NULL, 0, &cause) != 0) {
cmdlist = cmd_string_parse(cmd, NULL, 0, &cause);
if (cmdlist == NULL) {
if (cause != NULL) {
new_item = cmdq_get_callback(cmd_display_panes_error,
cause);