summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicm <nicm>2019-09-24 14:50:08 +0000
committernicm <nicm>2019-09-24 14:50:08 +0000
commit48c684cbc2b08d55c9790f05ac340e1a38e8bec4 (patch)
tree1fc8ea6d80dc0e472d9116a15ef7eb45e4e0a16f
parent232050830bbbfd9758d22dc84bcd78ce4c6ff3c5 (diff)
Mouse formats don't work in copy mode so don't try to use them.
-rw-r--r--format.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/format.c b/format.c
index b9f89bb5..581fa582 100644
--- a/format.c
+++ b/format.c
@@ -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;