diff --git a/CHANGES.txt b/CHANGES.txt index d1908cec5..5a83870c5 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -150,6 +150,7 @@ Changes in FLTK 1.4.0 Released: ??? ?? 2019 Bug Fixes - (add new items here) + - Fixed Fl_Text_Editor selection range after paste (STR #3248). - Fixed crash for very small Fl_Color_Chooser (STR #3490). - Removed all shadow lint in header files (STR #2714). - Fixed pulldown menu position when at the bottom of the screen (STR #2880). diff --git a/src/Fl_Text_Display.cxx b/src/Fl_Text_Display.cxx index 4d940a917..55cf709ed 100644 --- a/src/Fl_Text_Display.cxx +++ b/src/Fl_Text_Display.cxx @@ -3971,7 +3971,11 @@ int Fl_Text_Display::handle(int event) { handle(FL_FOCUS); } if (Fl_Group::handle(event)) return 1; - if (Fl::event_state()&FL_SHIFT) return handle(FL_DRAG); + if (Fl::event_state()&FL_SHIFT) { + if (!buffer()->primary_selection()->selected()) + dragPos = insert_position(); + return handle(FL_DRAG); + } dragging = 1; int pos = xy_to_position(Fl::event_x(), Fl::event_y(), CURSOR_POS); dragPos = pos;