From 42094209fdb80cad3bf2bc0add5276f15b672d96 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sat, 7 Dec 2019 15:27:23 +1100 Subject: [PATCH] Update New flag and last save timestamp on buffer rename Fxies #3244 --- src/buffer.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/buffer.cc b/src/buffer.cc index 24cf1576..4a697dd8 100644 --- a/src/buffer.cc +++ b/src/buffer.cc @@ -156,6 +156,11 @@ bool Buffer::set_name(String name) { m_name = real_path(name); m_display_name = compact_path(m_name); + if (m_flags & Buffer::Flags::File and not file_exists(m_name)) + { + m_flags |= Buffer::Flags::New; + m_last_save_history_id = HistoryId::Invalid; + } } else {