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:
parent
5a1cd1487e
commit
f592768d3a
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user