Update fs status post buffer write
This commit is contained in:
parent
b68490ef11
commit
a3445232a4
|
@ -607,14 +607,14 @@ bool Buffer::is_modified() const
|
||||||
not m_current_undo_group.empty());
|
not m_current_undo_group.empty());
|
||||||
}
|
}
|
||||||
|
|
||||||
void Buffer::notify_saved()
|
void Buffer::notify_saved(FsStatus status)
|
||||||
{
|
{
|
||||||
if (not m_current_undo_group.empty())
|
if (not m_current_undo_group.empty())
|
||||||
commit_undo_group();
|
commit_undo_group();
|
||||||
|
|
||||||
m_flags &= ~Flags::New;
|
m_flags &= ~Flags::New;
|
||||||
m_last_save_history_id = m_history_id;
|
m_last_save_history_id = m_history_id;
|
||||||
m_fs_status.timestamp = get_fs_timestamp(m_name);
|
m_fs_status = status;
|
||||||
}
|
}
|
||||||
|
|
||||||
BufferCoord Buffer::advance(BufferCoord coord, ByteCount count) const
|
BufferCoord Buffer::advance(BufferCoord coord, ByteCount count) const
|
||||||
|
|
|
@ -203,7 +203,7 @@ public:
|
||||||
bool is_modified() const;
|
bool is_modified() const;
|
||||||
|
|
||||||
// notify the buffer that it was saved in the current state
|
// notify the buffer that it was saved in the current state
|
||||||
void notify_saved();
|
void notify_saved(FsStatus status);
|
||||||
|
|
||||||
ValueMap& values() const { return m_values; }
|
ValueMap& values() const { return m_values; }
|
||||||
|
|
||||||
|
|
|
@ -392,7 +392,7 @@ void write_buffer_to_file(Buffer& buffer, StringView filename,
|
||||||
|
|
||||||
if ((buffer.flags() & Buffer::Flags::File) and
|
if ((buffer.flags() & Buffer::Flags::File) and
|
||||||
real_path(filename) == real_path(buffer.name()))
|
real_path(filename) == real_path(buffer.name()))
|
||||||
buffer.notify_saved();
|
buffer.notify_saved(get_fs_status(real_path(filename)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void write_buffer_to_backup_file(Buffer& buffer)
|
void write_buffer_to_backup_file(Buffer& buffer)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user