aboutsummaryrefslogtreecommitdiff
path: root/screen.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2010-12-11 17:56:01 +0000
committerNicholas Marriott <nicm@openbsd.org>2010-12-11 17:56:01 +0000
commit20ed20ea1eb996cbfc530688dac7646f58a43fe6 (patch)
treea771290c7f6affb123b236adce41939b6eecb143 /screen.c
parent9802fea6152197c7887937c0d1e8637ae317443b (diff)
downloadrtmux-20ed20ea1eb996cbfc530688dac7646f58a43fe6.tar.gz
rtmux-20ed20ea1eb996cbfc530688dac7646f58a43fe6.tar.bz2
rtmux-20ed20ea1eb996cbfc530688dac7646f58a43fe6.zip
Fix rectangle copy to behave like emacs - the cursor is not part of the
selection on the right edge but on the left it is.
Diffstat (limited to 'screen.c')
-rw-r--r--screen.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/screen.c b/screen.c
index 333ff969..1860e247 100644
--- a/screen.c
+++ b/screen.c
@@ -287,7 +287,7 @@ screen_check_selection(struct screen *s, u_int px, u_int py)
*/
if (sel->ex < sel->sx) {
/* Cursor (ex) is on the left. */
- if (px <= sel->ex)
+ if (px < sel->ex)
return (0);
if (px > sel->sx)
@@ -297,7 +297,7 @@ screen_check_selection(struct screen *s, u_int px, u_int py)
if (px < sel->sx)
return (0);
- if (px >= sel->ex)
+ if (px > sel->ex)
return (0);
}
} else {