mirror of
https://github.com/tmate-io/tmate.git
synced 2024-12-24 15:48:58 +01: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)
|
if (cmd_find_pane(ctx, data->target, NULL, &wp) == NULL)
|
||||||
return (-1);
|
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);
|
window_copy_init_from_pane(wp);
|
||||||
if (wp->mode == &window_copy_mode && cmd_check_flag(data->chflags, 'u'))
|
if (wp->mode == &window_copy_mode && cmd_check_flag(data->chflags, 'u'))
|
||||||
window_copy_pageup(wp);
|
window_copy_pageup(wp);
|
||||||
|
Loading…
Reference in New Issue
Block a user