Clear key properly if on space with nothing in it.

pull/1161/head
nicm 2017-11-03 17:11:20 +00:00
parent 50a5f84cb4
commit a2681ffcee
1 changed files with 6 additions and 3 deletions

View File

@ -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];