aboutsummaryrefslogtreecommitdiff
path: root/selection.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2022-11-24 16:05:27 +0000
committerDaniel Eklöf <daniel@ekloef.se>2022-11-24 18:18:20 +0000
commit0fc8b65a2b77a5c4dd066e4d49be470ee1d1f70a (patch)
treebb2ad95029bc4938d8f63a17f92574cdb2e40007 /selection.c
parentMerge branch 'line-height-adjust' (diff)
selection: selection_on_rows(): typo: row_start -> row_end
This fixes an issue where selections in the scroll margins were not detected correctly. This meant they weren’t canceled as they should have been, which in turn caused a visual glitch where text appeared to be selected, but were in fact not.
Diffstat (limited to 'selection.c')
-rw-r--r--selection.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/selection.c b/selection.c
index 92f1f85f..f6349d7f 100644
--- a/selection.c
+++ b/selection.c
@@ -86,7 +86,7 @@ selection_on_rows(const struct terminal *term, int row_start, int row_end)
const int rel_row_start =
grid_row_abs_to_sb_precalc_sb_start(grid, sb_start, row_start);
const int rel_row_end =
- grid_row_abs_to_sb_precalc_sb_start(grid, sb_start, row_start);
+ grid_row_abs_to_sb_precalc_sb_start(grid, sb_start, row_end);
int rel_sel_start =
grid_row_abs_to_sb_precalc_sb_start(grid, sb_start, start->row);
int rel_sel_end =