Fixup f3a0e8ff: costly thinko

When the buffer stuff has been updated, the Buffer::needUpdate()
should be reset to false. This was forgotten in f3a0e8ff.

Fixes performance issues with MergedManuals, for example. UpdateBuffer
would be run again and again when selecting text.
This commit is contained in:
Jean-Marc Lasgouttes 2021-04-09 18:15:31 +02:00
parent b08a653f35
commit c9146e5be0
2 changed files with 8 additions and 1 deletions

View File

@ -4914,6 +4914,13 @@ void Buffer::bufferRefs(TeXErrors const & terr, ErrorList & errorList) const
}
void Buffer::updateBuffer() const
{
updateBuffer(UpdateMaster, InternalUpdate);
d->need_update = false;
}
void Buffer::updateBuffer(UpdateScope scope, UpdateType utype) const
{
LBUFERR(!text().paragraphs().empty());

View File

@ -728,7 +728,7 @@ public:
/// Updates screen labels and some other information associated with
/// insets and paragraphs. Actually, it's more like a general "recurse
/// through the Buffer" routine, that visits all the insets and paragraphs.
void updateBuffer() const { updateBuffer(UpdateMaster, InternalUpdate); }
void updateBuffer() const;
/// \param scope: whether to start with the master document or just
/// do this one.
/// \param output: whether we are preparing for output.