Fl_Text_Display: Fix text selection off-by-one bug (#1080)

This seems to have been left over from when mouse text selection would start a text selection on the left side of the character and always extend the selection to include the character under the cursor.

We now perform text selection based on whether the selection spans across the horizontal center of a character and so this next_char() causes the endpoint of the selection to be incorrectly shifted to the right.
This commit is contained in:
Andrew Fuller 2024-10-06 07:18:37 -07:00 committed by GitHub
parent 9d194ac960
commit 3431c9d21a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4335,7 +4335,6 @@ int Fl_Text_Display::handle(int event) {
scroll_direction = 0;
}
pos = xy_to_position(X, Y, CURSOR_POS);
pos = buffer()->next_char(pos);
}
fl_text_drag_me(pos, this);
return 1;