Repository :
https://github.com/FarGroup/FarManager
On branch : master
Link :
https://github.com/FarGroup/FarManager/commit/bccf4c88f50a30d33912758d3c3b96fe9e6cb1c0
>---------------------------------------------------------------
commit bccf4c88f50a30d33912758d3c3b96fe9e6cb1c0
Author: Alex Alabuzhev <
alab...@gmail.com>
Date: Sat Jul 18 14:02:22 2026 +0100
Continue 6717
>---------------------------------------------------------------
bccf4c88f50a30d33912758d3c3b96fe9e6cb1c0
far/changelog | 7 +++++++
far/fileedit.cpp | 20 +++++++++++++++++++-
far/vbuild.m4 | 2 +-
3 files changed, 27 insertions(+), 2 deletions(-)
diff --git a/far/changelog b/far/changelog
index 7dbb0534c..51a050f6d 100644
--- a/far/changelog
+++ b/far/changelog
@@ -1,8 +1,15 @@
+--------------------------------------------------------------------------------
+drkns 2026-07-18 13:55:16+01:00 - build 6719
+
+1. Continue 6717.
+
--------------------------------------------------------------------------------
drkns 2026-07-17 21:07:45+01:00 - build 6718
1. Continue 6717.
+2. Refactoring.
+
--------------------------------------------------------------------------------
drkns 2026-07-15 22:08:49+01:00 - build 6717
diff --git a/far/fileedit.cpp b/far/fileedit.cpp
index cf807c71a..85cd229ad 100644
--- a/far/fileedit.cpp
+++ b/far/fileedit.cpp
@@ -193,7 +193,22 @@ enum class badcp_action
static badcp_action BadCodepageDialog(bool const IsLoad, uintptr_t& codepage, std::variant<wchar_t, bytes> const& Data)
{
- DialogBuilder Builder(lng::MWarning);
+ size_t
+ ComboboxId,
+ ProceedButtonId;
+
+ DialogBuilder Builder(lng::MWarning, {}, [&](Dialog* const Dlg, intptr_t const Msg, intptr_t const Param1, void* const Param2)
+ {
+ switch (Msg)
+ {
+ case DN_EDITCHANGE:
+ if (!IsLoad && static_cast<size_t>(Param1) == ComboboxId)
+ Dlg->SendMessage(DM_SETFOCUS, ProceedButtonId, {});
+ break;
+ }
+
+ return Dlg->DefProc(Msg, Param1, Param2);
+ });
const auto [UsupportedData, UsupportedDataMessage] = codepages::UnsupportedDataMessage(Data);
@@ -221,6 +236,7 @@ static badcp_action BadCodepageDialog(bool const IsLoad, uintptr_t& codepage, st
const auto MaxLength = std::ranges::fold_left(Messages, 0uz, [](size_t const Value, string const& i){ return std::max(Value, i.size()); });
Builder.AddComboBox(cp_val, static_cast<int>(std::max(MaxLength, 46uz)), Items);
+ ComboboxId = Builder.GetLastID();
add_line(Messages[1]);
add_line(Messages[2]);
@@ -234,6 +250,8 @@ static badcp_action BadCodepageDialog(bool const IsLoad, uintptr_t& codepage, st
Builder.AddButtons({{ lng::MEditorSaveCPWarnShow, lng::MEditorSave, lng::MCancel }});
}
+ ProceedButtonId = Builder.GetLastID() - 1;
+
Builder.SetDialogMode(DMODE_WARNINGSTYLE);
Builder.SetId(BadEditorCodePageId);
diff --git a/far/vbuild.m4 b/far/vbuild.m4
index 0bd97caa0..205dd94a4 100644
--- a/far/vbuild.m4
+++ b/far/vbuild.m4
@@ -1 +1 @@
-6718
+6719