summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2019-12-19 13:39:30 +1100
committerMaxime Coste <mawww@kakoune.org>2019-12-19 13:39:30 +1100
commita3445232a47e487f06a42e7c184362bcfa1b7179 (patch)
tree6178158cc5f3b195b7ba02f32708837c8d760c01 /src
parentb68490ef11734c404f8a18f1babd8004aca2de06 (diff)
Update fs status post buffer write
Diffstat (limited to 'src')
-rw-r--r--src/buffer.cc4
-rw-r--r--src/buffer.hh2
-rw-r--r--src/file.cc2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/buffer.cc b/src/buffer.cc
index 0d738dad..f7eeee31 100644
--- a/src/buffer.cc
+++ b/src/buffer.cc
@@ -607,14 +607,14 @@ bool Buffer::is_modified() const
not m_current_undo_group.empty());
}
-void Buffer::notify_saved()
+void Buffer::notify_saved(FsStatus status)
{
if (not m_current_undo_group.empty())
commit_undo_group();
m_flags &= ~Flags::New;
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
diff --git a/src/buffer.hh b/src/buffer.hh
index a2517956..0700acb9 100644
--- a/src/buffer.hh
+++ b/src/buffer.hh
@@ -203,7 +203,7 @@ public:
bool is_modified() const;
// 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; }
diff --git a/src/file.cc b/src/file.cc
index 180eca4a..79043d1c 100644
--- a/src/file.cc
+++ b/src/file.cc
@@ -392,7 +392,7 @@ void write_buffer_to_file(Buffer& buffer, StringView filename,
if ((buffer.flags() & Buffer::Flags::File) and
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)