Author: manolo
Date: 2012-12-29 03:58:49 -0800 (Sat, 29 Dec 2012)
New Revision: 9781
Log:
Display the moving insertion point when doing drag&drop to an Fl_Text_Display
widget from the widget itself.
Modified:
branches/branch-1.3/src/Fl_Text_Display.cxx
Modified: branches/branch-1.3/src/Fl_Text_Display.cxx
===================================================================
--- branches/branch-1.3/src/Fl_Text_Display.cxx 2012-12-26 19:58:31 UTC (rev
9780)
+++ branches/branch-1.3/src/Fl_Text_Display.cxx 2012-12-29 11:58:49 UTC (rev
9781)
@@ -3468,12 +3468,14 @@
}
// 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,
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit