diff options
| author | Manolo Gouy <Manolo> | 2012-12-29 11:58:49 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2012-12-29 11:58:49 +0000 |
| commit | 0c6ad247ddec015919deb8ffaddbc2f4121c848e (patch) | |
| tree | cc0e29f4165149b264e7727a03fcbea10ee1710f /src/Fl_Text_Display.cxx | |
| parent | d879e4b2e8660d6b48f35492278e0e3d31528070 (diff) | |
Display the moving insertion point when doing drag&drop to an Fl_Text_Display widget from the widget itself.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9781 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Text_Display.cxx')
| -rw-r--r-- | src/Fl_Text_Display.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Fl_Text_Display.cxx b/src/Fl_Text_Display.cxx index 5c418fc7d..5f086eaa2 100644 --- a/src/Fl_Text_Display.cxx +++ b/src/Fl_Text_Display.cxx @@ -3468,12 +3468,14 @@ void Fl_Text_Display::draw(void) { } // draw the text cursor + int start, end; + int has_selection = buffer()->selection_position(&start, &end); if (damage() & (FL_DAMAGE_ALL | FL_DAMAGE_SCROLL | FL_DAMAGE_EXPOSE) && ( #ifdef __APPLE__ Fl::marked_text_length() || #endif - !buffer()->primary_selection()->selected()) && + !has_selection || mCursorPos < start || mCursorPos > end) && mCursorOn && Fl::focus() == (Fl_Widget*)this ) { fl_push_clip(text_area.x-LEFT_MARGIN, text_area.y, |
