From 138caf294ea4d7968df36ead9d5ff5fc49f6215f Mon Sep 17 00:00:00 2001 From: "Devin J. Pohly" Date: Wed, 21 Feb 2018 22:48:28 -0600 Subject: Have selected() check whether selection exists Signed-off-by: Devin J. Pohly --- st.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'st.c') diff --git a/st.c b/st.c index dae7b91..d4dfe6e 100644 --- a/st.c +++ b/st.c @@ -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) -- cgit v1.2.3-70-g09d2