mirror of
https://github.com/tmux/tmux.git
synced 2024-12-12 17:38:48 +00:00
Handle failure to change mode, to avoid dying when switching into copy
mode when already in a different mode. Reported by "Florian".
This commit is contained in:
parent
3999886901
commit
ae70071494
@ -62,7 +62,8 @@ cmd_copy_mode_exec(struct cmd *self, struct cmd_ctx *ctx)
|
||||
if (cmd_find_pane(ctx, data->target, NULL, &wp) == NULL)
|
||||
return (-1);
|
||||
|
||||
window_pane_set_mode(wp, &window_copy_mode);
|
||||
if (window_pane_set_mode(wp, &window_copy_mode) != 0)
|
||||
return (0);
|
||||
window_copy_init_from_pane(wp);
|
||||
if (wp->mode == &window_copy_mode && cmd_check_flag(data->chflags, 'u'))
|
||||
window_copy_pageup(wp);
|
||||
|
Loading…
Reference in New Issue
Block a user