]> git.lyx.org Git - lyx.git/blobdiff - src/Text3.cpp
Russian layouttranslations reviewed by Yuriy, Dec 13 2017.
[lyx.git] / src / Text3.cpp
index 4b2f90af4b230d98d5f66a161f6abe3a6dae1f4c..305a1d28b21b1640a8d5e43c741fec00fed1a4c6 100644 (file)
@@ -770,6 +770,18 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
                        cur.upDownInText(up, needsUpdate);
                        needsUpdate |= cur.beforeDispatchCursor().inMathed();
                } else {
+                       pos_type newpos = up ? 0 : cur.lastpos();
+                       if (lyxrc.mac_like_cursor_movement && cur.pos() != newpos) {
+                               needsUpdate |= cur.selHandle(select);
+                               // we do not reset the targetx of the cursor
+                               cur.pos() = newpos;
+                               needsUpdate |= bv->checkDepm(cur, bv->cursor());
+                               cur.updateTextTargetOffset();
+                               if (needsUpdate)
+                                       cur.forceBufferUpdate();
+                               break;
+                       }
+
                        // if the cursor cannot be moved up or down do not remove
                        // the selection right now, but wait for the next dispatch.
                        if (select)