]> git.lyx.org Git - lyx.git/blobdiff - src/Text3.cpp
Update tex2lyx test reference after 754cb3d1
[lyx.git] / src / Text3.cpp
index 0467aa8b69f4fa26dac881bbd683894140d23f2c..eafce2854c2efdb308b9550a4a382a8a58439702 100644 (file)
@@ -97,6 +97,7 @@ using cap::replaceSelection;
 using cap::grabAndEraseSelection;
 using cap::selClearOrDel;
 using cap::pasteSimpleText;
+using frontend::Clipboard;
 
 // globals...
 static Font freefont(ignore_font, ignore_language);
@@ -1606,9 +1607,11 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
                bvcur.setMark(false);
                switch (cmd.button()) {
                case mouse_button::button1:
-                       // Set the cursor
-                       if (!bv->mouseSetCursor(cur, cmd.argument() == "region-select"))
-                               cur.screenUpdateFlags(Update::FitCursor);
+                       if (!bvcur.selection())
+                               // Set the cursor
+                               bvcur.resetAnchor();
+                       if (!bv->mouseSetCursor(cur, cmd.modifier() == ShiftModifier))
+                               cur.screenUpdateFlags(Update::SinglePar | Update::FitCursor);
                        if (bvcur.wordSelection())
                                selectWord(bvcur, WHOLE_WORD);
                        break;