Le 30/11/2025 à 03:08, Richard Kimberly Heck a écrit :
This was quite a deliberate change, way back in 1.5-beta2. I wonder if
it's still required. The comments suggest it would not be "if we had a
working InsetText::notifyCursorLeaves". Don't we now?
Scott, if you want to try it out, you basically just need to revert
05c47c5f. That will speed things up. But it may cause other problems.
tl;dr: I would just remove the forceBufferUpdate() thing.
My question is rather whether it was right to add the
forceBufferUpdate() in 5577e877. Indeed, before this commit, update
meant "update metrics" and not "update buffer".
To see that, notice that the only uses of the return value of
mouseSetBuffer are in the handling of MOUSE_PRESS and loo like:
if (!bv->mouseSetCursor(cur, cmd.modifier() == ShiftModifier))
cur.screenUpdateFlags(Update::FitCursor);
Currently, it does not make sense, since in LyXAction.cpp,
LFUN_MOUSE_PRESS is marked as NoUpdate, so that, when update is true, no
update actually takes place.
Actually, this is a new situation since I changed it at 9fd397ac1cb.
Before that, the "update" return value meant "Please compute all metrics".
So as a cleanup I would additionally remove this "update" return value
altogether. It is the responsability of notifyLeaveInset and friends to
set Update::Force when necessary. There is the question of FitCursor
that is not clear to me yet. I can take care of that cleanup.
JMarc
--
lyx-devel mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-devel