Clear buffer values on fifo buffer recreation

The cached WordDB/Highlighters/FifoReader are not relevant and are
better fully rebuilt than updated. This speeds up rebuilding the
WordDB of big fifo buffers such as a `git log`.
This commit is contained in:
Maxime Coste 2023-10-25 12:53:55 +11:00
parent be33dee211
commit d1c8622dc7

View File

@ -178,6 +178,7 @@ Buffer* create_fifo_buffer(String name, int fd, Buffer::Flags flags, bool scroll
if (buffer)
{
buffer->flags() |= Buffer::Flags::NoUndo | flags;
buffer->values().clear();
buffer->reload({StringData::create({"\n"})}, ByteOrderMark::None, EolFormat::Lf, {InvalidTime, {}, {}});
}
else