]> git.lyx.org Git - lyx.git/blobdiff - src/Text3.cpp
Fix copy and paste error in 6659304f7f8b
[lyx.git] / src / Text3.cpp
index 36739a8e1e21c732226dd15b5afb85c25d1c2125..adeb80b88f15ec737c699a0d305d6cd71683f8b2 100644 (file)
@@ -860,6 +860,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)