Do not try to use the last marked pane if it is invalid.

pull/2270/head
nicm 2020-05-26 08:47:50 +00:00
parent ea610a3119
commit ca0166f26f
1 changed files with 4 additions and 1 deletions

View File

@ -129,7 +129,10 @@ cmd_select_pane_exec(struct cmd *self, struct cmdq_item *item)
if (args_has(args, 'm') || args_has(args, 'M')) {
if (args_has(args, 'm') && !window_pane_visible(wp))
return (CMD_RETURN_NORMAL);
lastwp = marked_pane.wp;
if (server_check_marked())
lastwp = marked_pane.wp;
else
lastwp = NULL;
if (args_has(args, 'M') || server_is_marked(s, wl, wp))
server_clear_marked();