diff options
author | nicm <nicm> | 2017-11-03 17:11:20 +0000 |
---|---|---|
committer | nicm <nicm> | 2017-11-03 17:11:20 +0000 |
commit | a2681ffcee99a83d33d159132bb8e748f4144dd3 (patch) | |
tree | b7db513d520f48721fce5f14083fcf935af6bdc0 /mode-tree.c | |
parent | 50a5f84cb4accf806dea2235ca8d3749b107aac8 (diff) | |
download | rtmux-a2681ffcee99a83d33d159132bb8e748f4144dd3.tar.gz rtmux-a2681ffcee99a83d33d159132bb8e748f4144dd3.tar.bz2 rtmux-a2681ffcee99a83d33d159132bb8e748f4144dd3.zip |
Clear key properly if on space with nothing in it.
Diffstat (limited to 'mode-tree.c')
-rw-r--r-- | mode-tree.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/mode-tree.c b/mode-tree.c index 79af6ab5..662d4b17 100644 --- a/mode-tree.c +++ b/mode-tree.c @@ -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]; |