summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2017-11-03 17:11:21 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2017-11-03 17:11:21 +0000
commit58a3b20de45d8bc4f89a942a16f8e1e1c5ea450a (patch)
tree54455a9a1e8511afe4df823000ce4952f088d943 /usr.bin
parent96b39fb4174f16e077cc09d1738c335b52ac1b30 (diff)
Clear key properly if on space with nothing in it.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/tmux/mode-tree.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/usr.bin/tmux/mode-tree.c b/usr.bin/tmux/mode-tree.c
index 6095bcaa116..e3982622e80 100644
--- a/usr.bin/tmux/mode-tree.c
+++ b/usr.bin/tmux/mode-tree.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mode-tree.c,v 1.19 2017/11/03 17:02:33 nicm Exp $ */
+/* $OpenBSD: mode-tree.c,v 1.20 2017/11/03 17:11:20 nicm Exp $ */
/*
* Copyright (c) 2017 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -745,7 +745,7 @@ mode_tree_key(struct mode_tree_data *mtd, struct client *c, key_code *key,
if (yp != NULL)
*yp = y;
if (x > mtd->width || y > mtd->height) {
- if (!mtd->preview || y < mtd->height)
+ if (!mtd->preview)
*key = KEYC_NONE;
return (0);
}
@@ -755,8 +755,11 @@ mode_tree_key(struct mode_tree_data *mtd, struct client *c, key_code *key,
mtd->current = mtd->offset + y;
if (*key == KEYC_DOUBLECLICK1_PANE)
*key = '\r';
- return (0);
- }
+ else
+ *key = KEYC_NONE;
+ } else
+ *key = KEYC_NONE;
+ return (0);
}
line = &mtd->line_list[mtd->current];