mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-04 05:32:40 +02:00
In extend from point mode always restrict the top line to be from the point, even for multiline selections
Otherwise soft wrapped lines cause the full first line to be selected.
This commit is contained in:
@@ -2696,7 +2696,7 @@ screen_update_selection(Screen *self, index_type x, index_type y, bool in_left_h
|
||||
}
|
||||
if (screen_selection_range_for_line(self, top_line, &start.x, &start.y) && screen_selection_range_for_line(self, bottom_line, &end.x, &end.y)) {
|
||||
bool multiline = top_line != bottom_line;
|
||||
if (!multiline && self->selections.extend_mode == EXTEND_LINE_FROM_POINT) {
|
||||
if (self->selections.extend_mode == EXTEND_LINE_FROM_POINT) {
|
||||
if (x > end.y) break;
|
||||
a->x = x;
|
||||
} else a->x = multiline ? 0 : start.x;
|
||||
|
||||
Reference in New Issue
Block a user