Have selected() check whether selection exists

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
This commit is contained in:
Devin J. Pohly committed 2018-02-25 21:53:24 -06:00
1 parent d84f3f4bd1
commit 138caf294e
2 files changed
+6 -7

No files matched your search

+2 -1
View File
@@ -419,7 +419,8 @@ selnormalize(void)
int
selected(int x, int y)
{
if (sel.mode == SEL_EMPTY)
if (sel.mode == SEL_EMPTY || sel.ob.x == -1 ||
sel.alt != IS_SET(MODE_ALTSCREEN))
return 0;
if (sel.type == SEL_RECTANGULAR)