[FarGroup/FarManager] master: gh-1031: History saved for hidden edit controls (b4d3fbe27)

0 views
Skip to first unread message

farg...@farmanager.com

unread,
Oct 16, 2025, 3:30:58 PM (11 days ago) Oct 16
to farco...@googlegroups.com
Repository : https://github.com/FarGroup/FarManager
On branch : master
Link : https://github.com/FarGroup/FarManager/commit/b4d3fbe27e6e0b0809de66133a1cd34bb0560a1b

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

commit b4d3fbe27e6e0b0809de66133a1cd34bb0560a1b
Author: Alex Alabuzhev <alab...@gmail.com>
Date: Thu Oct 16 20:23:09 2025 +0100

gh-1031: History saved for hidden edit controls

Only save the history if the user touched the control


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

b4d3fbe27e6e0b0809de66133a1cd34bb0560a1b
far/dialog.cpp | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/far/dialog.cpp b/far/dialog.cpp
index 8c310597a..a87b06743 100644
--- a/far/dialog.cpp
+++ b/far/dialog.cpp
@@ -4194,8 +4194,11 @@ intptr_t Dialog::CloseDialog()
{
for (auto& i: Items)
{
- if (i.Flags & DIF_HISTORY && !(i.Flags & DIF_MANUALADDHISTORY) && !i.strHistory.empty())
- AddToEditHistory(i, i.strData);
+ if (i.Flags & DIF_HISTORY && !(i.Flags & DIF_MANUALADDHISTORY) && !i.strHistory.empty() && IsEdit(i.Type))
+ {
+ if (const auto EditPtr = static_cast<const DlgEdit*>(i.ObjPtr); EditPtr && !EditPtr->GetClearFlag())
+ AddToEditHistory(i, i.strData);
+ }
}
}



Reply all
Reply to author
Forward
0 new messages