I investigated a bit into why selection with mouse double/triple clicking 
fails. It seems that the selection is being made but not drawn, because 
LyXText::drawSelection checks for bv->cursor(), while the selection has been 
passed to the (local?) cur in dispatch.

The attached patch gets the selection back, but it does not work for insets. 
Double clicking inside a footnote lets the cursor jump outside the inset. 
Triple clicking selects the line of the owning main text, instead of only the 
insettext. 

Cursor people, please have a look.

Regards,
Jürgen
Index: text3.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/text3.C,v
retrieving revision 1.289
diff -u -r1.289 text3.C
--- text3.C	14 Apr 2005 10:19:37 -0000	1.289
+++ text3.C	18 Apr 2005 09:09:13 -0000
@@ -981,6 +981,7 @@
 			cur.resetAnchor();
 			cursorEnd(cur);
 			cur.setSelection();
+			bv->cursor() = cur;
 			bv->haveSelection(cur.selection());
 		}
 		break;
@@ -988,6 +989,7 @@
 	case LFUN_MOUSE_DOUBLE:
 		if (cmd.button() == mouse_button::button1) {
 			selectWord(cur, lyx::WHOLE_WORD_STRICT);
+			bv->cursor() = cur;
 			bv->haveSelection(cur.selection());
 		}
 		break;

Reply via email to