X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FText3.cpp;h=adeb80b88f15ec737c699a0d305d6cd71683f8b2;hb=ce2e1554908785d7accba292985017fb961b1450;hp=36739a8e1e21c732226dd15b5afb85c25d1c2125;hpb=8cc7fe1c4b2739f4b0e946ee192745203e8e5860;p=lyx.git diff --git a/src/Text3.cpp b/src/Text3.cpp index 36739a8e1e..adeb80b88f 100644 --- a/src/Text3.cpp +++ b/src/Text3.cpp @@ -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)