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 /src/Fl_Text_Display.cxx | |
| parent | b663ce85e0f200337626b80ba32cd5b8573a93c6 (diff) | |
Fixed Fl_Text_Editor selection range after paste (STR #3248).
Diffstat (limited to 'src/Fl_Text_Display.cxx')
| -rw-r--r-- | src/Fl_Text_Display.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
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; |
