Remove the New flag from a buffer after reloading it

If we reload a buffer, it means its underlying file exists, hence the
New flag does not make sense anymore. It could be that the file appeared
on the filesystem in the meantime.
This commit is contained in:
Maxime Coste 2018-02-05 20:18:51 +11:00
parent 5a1cd1487e
commit f592768d3a

View File

@ -86,6 +86,7 @@ void reload_file_buffer(Buffer& buffer)
kak_assert(buffer.flags() & Buffer::Flags::File);
MappedFile file_data{buffer.name()};
buffer.reload(file_data, file_data.st.st_mtim);
buffer.flags() &= ~Buffer::Flags::New;
}
Buffer* create_fifo_buffer(String name, int fd, Buffer::Flags flags, bool scroll)