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:
parent
be33dee211
commit
d1c8622dc7
|
@ -178,6 +178,7 @@ Buffer* create_fifo_buffer(String name, int fd, Buffer::Flags flags, bool scroll
|
||||||
if (buffer)
|
if (buffer)
|
||||||
{
|
{
|
||||||
buffer->flags() |= Buffer::Flags::NoUndo | flags;
|
buffer->flags() |= Buffer::Flags::NoUndo | flags;
|
||||||
|
buffer->values().clear();
|
||||||
buffer->reload({StringData::create({"\n"})}, ByteOrderMark::None, EolFormat::Lf, {InvalidTime, {}, {}});
|
buffer->reload({StringData::create({"\n"})}, ByteOrderMark::None, EolFormat::Lf, {InvalidTime, {}, {}});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue
Block a user