}
-bool LyXText::cursorPrevious(LCursor & cur)
+void LyXText::cursorPrevious(LCursor & cur)
{
pos_type cpos = cur.pos();
pit_type cpar = cur.pit();
int x = cur.x_target();
+ // FIXME: there would maybe a need for this 'updated' boolean in the future...
bool updated = setCursorFromCoordinates(cur, x, 0);
- if (updated)
- cur.bv().update();
updated |= cursorUp(cur);
if (cpar == cur.pit() && cpos == cur.pos()) {
}
finishUndo();
- return updated;
+ cur.updateFlags(Update::Force | Update::FitCursor);
}
-bool LyXText::cursorNext(LCursor & cur)
+void LyXText::cursorNext(LCursor & cur)
{
pos_type cpos = cur.pos();
pit_type cpar = cur.pit();
int x = cur.x_target();
+ // FIXME: there would maybe a need for this 'updated' boolean in the future...
bool updated = setCursorFromCoordinates(cur, x, cur.bv().workHeight() - 1);
- if (updated)
- cur.bv().update();
updated |= cursorDown(cur);
if (cpar == cur.pit() && cpos == cur.pos()) {
}
finishUndo();
- return updated;
+ cur.updateFlags(Update::Force | Update::FitCursor);
}
cur.undispatched();
cmd = FuncRequest(LFUN_FINISHED_UP);
} else {
- needsUpdate |= cursorPrevious(cur);
+ cursorPrevious(cur);
}
break;
cur.undispatched();
cmd = FuncRequest(LFUN_FINISHED_DOWN);
} else {
- needsUpdate |= cursorNext(cur);
+ cursorNext(cur);
}
break;