diff options
| author | Matthias Melcher <git@matthiasm.com> | 2019-02-04 23:57:22 +0100 |
|---|---|---|
| committer | Matthias Melcher <git@matthiasm.com> | 2019-02-04 23:57:22 +0100 |
| commit | 4b4e95f2805375ac80b5921e19c1049090f3a5c8 (patch) | |
| tree | f52efcae77d6193474ec7d42172b094d8210aee5 | |
| parent | b663ce85e0f200337626b80ba32cd5b8573a93c6 (diff) | |
Fixed Fl_Text_Editor selection range after paste (STR #3248).
| -rw-r--r-- | CHANGES.txt | 1 | ||||
| -rw-r--r-- | src/Fl_Text_Display.cxx | 6 |
2 files changed, 6 insertions, 1 deletions
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; |
