Mouse formats don't work in copy mode so don't try to use them.

This commit is contained in:
nicm 2019-09-24 14:50:08 +00:00
parent 232050830b
commit 48c684cbc2

View File

@ -722,6 +722,8 @@ format_cb_mouse_word(struct format_tree *ft, struct format_entry *fe)
wp = cmd_mouse_pane(&ft->m, NULL, NULL);
if (wp == NULL)
return;
if (!TAILQ_EMPTY (&wp->modes))
return;
if (cmd_mouse_at(wp, &ft->m, &x, &y, 0) != 0)
return;
gd = wp->base.grid;
@ -798,6 +800,8 @@ format_cb_mouse_line(struct format_tree *ft, struct format_entry *fe)
wp = cmd_mouse_pane(&ft->m, NULL, NULL);
if (wp == NULL)
return;
if (!TAILQ_EMPTY (&wp->modes))
return;
if (cmd_mouse_at(wp, &ft->m, &x, &y, 0) != 0)
return;
gd = wp->base.grid;