mirror of
https://github.com/tmate-io/tmate.git
synced 2025-02-02 19:39:32 +01:00
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.
This commit is contained in:
parent
9802fea615
commit
20ed20ea1e
4
screen.c
4
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 {
|
||||
|
@ -1267,8 +1267,8 @@ window_copy_copy_selection(struct window_pane *wp, struct session *sess)
|
||||
/* Cursor is on the left. */
|
||||
lastex = data->selx + 1;
|
||||
restex = data->selx + 1;
|
||||
firstsx = data->cx + 1;
|
||||
restsx = data->cx + 1;
|
||||
firstsx = data->cx;
|
||||
restsx = data->cx;
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user