diff options
author | Devin J. Pohly <djpohly@gmail.com> | 2018-02-21 22:48:28 -0600 |
---|---|---|
committer | Devin J. Pohly <djpohly@gmail.com> | 2018-02-25 21:53:24 -0600 |
commit | 138caf294ea4d7968df36ead9d5ff5fc49f6215f (patch) | |
tree | 195d9158175673e0a59d8fd5e013e5506c652bce /st.c | |
parent | d84f3f4bd15e7d65fc0334cf7d62913c901bad00 (diff) | |
download | st-138caf294ea4d7968df36ead9d5ff5fc49f6215f.tar.gz st-138caf294ea4d7968df36ead9d5ff5fc49f6215f.zip |
Have selected() check whether selection exists
Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
Diffstat (limited to 'st.c')
-rw-r--r-- | st.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -419,7 +419,8 @@ selnormalize(void) | |||
419 | int | 419 | int |
420 | selected(int x, int y) | 420 | selected(int x, int y) |
421 | { | 421 | { |
422 | if (sel.mode == SEL_EMPTY) | 422 | if (sel.mode == SEL_EMPTY || sel.ob.x == -1 || |
423 | sel.alt != IS_SET(MODE_ALTSCREEN)) | ||
423 | return 0; | 424 | return 0; |
424 | 425 | ||
425 | if (sel.type == SEL_RECTANGULAR) | 426 | if (sel.type == SEL_RECTANGULAR) |