diff options
| author | Maxime Coste <mawww@kakoune.org> | 2017-06-28 06:48:24 +0100 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2017-06-28 06:48:24 +0100 |
| commit | cc946764ed16ea36c651aff6716c2f96e5471909 (patch) | |
| tree | 620fc0994a33a17e6f160918bdf0e2d04f82f028 /src/buffer.cc | |
| parent | 641acc59433f73e6bc64f9d04e98deae7d7c5ffc (diff) | |
Consider non-files buffers as never modified
Diffstat (limited to 'src/buffer.cc')
| -rw-r--r-- | src/buffer.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/buffer.cc b/src/buffer.cc index 0bdb8866..74c22c26 100644 --- a/src/buffer.cc +++ b/src/buffer.cc @@ -595,8 +595,9 @@ BufferCoord Buffer::replace(BufferCoord begin, BufferCoord end, StringView conte bool Buffer::is_modified() const { - return m_history_cursor != m_last_save_history_cursor - or not m_current_undo_group.empty(); + return m_flags & Flags::File and + (m_history_cursor != m_last_save_history_cursor or + not m_current_undo_group.empty()); } void Buffer::notify_saved() |
