[FarGroup/FarManager] master: gh-939: Set ECSTATE_SAVED only when the file was saved by the user (67e254f03)

0 views
Skip to first unread message

farg...@farmanager.com

unread,
Sep 21, 2025, 10:45:56 AM (10 days ago) Sep 21
to farco...@googlegroups.com
Repository : https://github.com/FarGroup/FarManager
On branch : master
Link : https://github.com/FarGroup/FarManager/commit/67e254f03efc31661dea32a47d2a35c84dce58b1

>---------------------------------------------------------------

commit 67e254f03efc31661dea32a47d2a35c84dce58b1
Author: Alex Alabuzhev <alab...@gmail.com>
Date: Sun Sep 21 15:44:13 2025 +0100

gh-939: Set ECSTATE_SAVED only when the file was saved by the user


>---------------------------------------------------------------

67e254f03efc31661dea32a47d2a35c84dce58b1
far/changelog | 5 +++++
far/editor.cpp | 3 ++-
far/vbuild.m4 | 2 +-
3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/far/changelog b/far/changelog
index b4017b414..02659dd27 100644
--- a/far/changelog
+++ b/far/changelog
@@ -1,3 +1,8 @@
+--------------------------------------------------------------------------------
+drkns 2025-09-21 15:41:04+01:00 - build 6562
+
+1. gh-939: Set ECSTATE_SAVED only when the file was saved by the user.
+
--------------------------------------------------------------------------------
MZK 2025-09-20 15:47:03-04:00 - build 6561

diff --git a/far/editor.cpp b/far/editor.cpp
index afcfe52ea..5ac064b10 100644
--- a/far/editor.cpp
+++ b/far/editor.cpp
@@ -5613,7 +5613,8 @@ int Editor::EditorControl(int Command, intptr_t Param1, void *Param2)
Info->BookmarkCount=BOOKMARK_COUNT;
Info->SessionBookmarkCount=GetSessionBookmarks(nullptr);
Info->CurState=m_Flags.Check(FEDITOR_LOCKMODE)?ECSTATE_LOCKED:0;
- Info->CurState|=!m_Flags.Check(FEDITOR_MODIFIED)?ECSTATE_SAVED:0;
+ if (const auto HostFileEditor = GetHostFileEditor())
+ Info->CurState |= HostFileEditor->WasFileSaved()? ECSTATE_SAVED : 0;
Info->CurState|=m_Flags.Check(FEDITOR_MODIFIED)?ECSTATE_MODIFIED:0;
Info->CodePage = GetCodePage();

diff --git a/far/vbuild.m4 b/far/vbuild.m4
index c4ab99bac..97017b6f5 100644
--- a/far/vbuild.m4
+++ b/far/vbuild.m4
@@ -1 +1 @@
-6561
+6562


Reply all
Reply to author
Forward
0 new messages