diff options
| author | Andrew Fuller <qartis@gmail.com> | 2024-10-06 07:18:37 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-06 16:18:37 +0200 |
| commit | 3431c9d21aac65fda0708557641b561e6abd9975 (patch) | |
| tree | 2c2f0d150198588968d99be025a863cd06cef6ca /src/Fl_Text_Display.cxx | |
| parent | 9d194ac9603f866a5c6c67ef91858555d082a9da (diff) | |
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.
Diffstat (limited to 'src/Fl_Text_Display.cxx')
| -rw-r--r-- | src/Fl_Text_Display.cxx | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/Fl_Text_Display.cxx b/src/Fl_Text_Display.cxx index 47fa17560..087681ea1 100644 --- a/src/Fl_Text_Display.cxx +++ b/src/Fl_Text_Display.cxx @@ -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; |
