From 382e9a31c5c631258da8f6ebb17f1b9aecb92e6b Mon Sep 17 00:00:00 2001 From: CismonX Date: Sun, 24 May 2026 06:47:49 +0800 Subject: selection: fix block selection direction update This patch fixes a condition check in selection_update(), so that during block selection, the selection area no longer gets incorrectly updated when selecting back across the starting column. --- selection.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'selection.c') diff --git a/selection.c b/selection.c index bb0d3f1b..4a62369d 100644 --- a/selection.c +++ b/selection.c @@ -1145,7 +1145,7 @@ selection_update(struct terminal *term, int col, int row) struct coord *pivot_end = &term->selection.pivot.end; if (term->selection.kind == SELECTION_BLOCK) { - if (new_end.col > pivot_start->col) + if (new_end.col >= pivot_start->col) new_direction = SELECTION_RIGHT; else new_direction = SELECTION_LEFT; -- cgit v1.3