The LFUN buffer-reset-export states to start afresh the export for the
next run, but in fact, the boolean was never reset, so that this was
done for all subsequent runs unless the buffer had been closed and
reopened.
Now the lfun does what it states and only acts on the next pass.
The IDs are used to link to specific elements (for instance, the User's guide nomenclature).
The beginning of the list (<ul> or <ol>) has the same magic ID as the first item of the list.
The effect is closer to what LyX offers. Previously, the percentage was of the HTML container (often, the whole page), meaning that images were oversized. Now, the scale is respected in the same way as LyX, but its bounding box is off. Overall, the result is better, but not what users expect.
The code is not ready for situations where some paragraphs that are
not visible have metrics available. This has been made visible by
a4d9315b, which removes a couple of full metrics updates: the screen
was not correctly scrolled after a scrollToCursor() call.
In PararagraphMetrics, some methods are added to be able to handle the
fact that paragraphs have or do not have a position.
In TextMetrics, a new method returns the first visible paragraph.
Finally, in BufferView::updateMetrics, the paragraphs' positions are
reset (in the case where everything is not cleared) and some care is
taken to skip the ones that are not relevant.
The assumption outside of this method is that all the paragraphs that
are in the TextMetrics are visible (we are talking about top-level
TextMetrics here). This could be changed (in order to avoid
recomputing paragraph metrics), but the cost is high in terms of
complexity and it is not clear that the gain in terms of performance
would be important.
When using a back store, it is obviously important to resize it
whenever the buffer view is resized. The new code path added in
527984ed skipped this part, so that the window was wrong when creating
a new window.
Commit 5577e877 introduces forceUpdateBuffer() to delay actual
updatBuffer() calls to a central place.
In Cursor::upDownInText, the updateNeeded flag (which triggers
Update::Force update flag) is set to true when Cursor::checkDepm
returns true. This is fine, except that checkDepm also leads to a
forceBufferUpdate() call.
The logic in the method was such that, when updateNeeded is already
true when entering, forceBufferUpdate() will be called even though
checkDepm did not request it.
Fixes a slight delay with selecting in MergedManual (the manual of
manuals).
The handling of Update::FitCursor traditionnally recomputes all
metrics once or twice. Now that updateMetrics(false) ensures that all
paragraphs that require it have a metrics, we might as well use that.
Take this occasion to move handling of Update::SinglePar earlier,
before the check for Update::ForceDraw.