Repository :
https://github.com/FarGroup/FarManager
On branch : master
Link :
https://github.com/FarGroup/FarManager/commit/4227b6f8b6b9fe14ef9dfeee4a64222c346af7f7
>---------------------------------------------------------------
commit 4227b6f8b6b9fe14ef9dfeee4a64222c346af7f7
Author: Alex Alabuzhev <
alab...@gmail.com>
Date: Sat Sep 12 22:58:02 2026 +0100
Plugin API: ensure that Menu BreakCode is set to -1 when Menu was cancelled
>---------------------------------------------------------------
4227b6f8b6b9fe14ef9dfeee4a64222c346af7f7
far/changelog | 5 +++++
far/plugapi.cpp | 6 +++---
far/vbuild.m4 | 2 +-
3 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/far/changelog b/far/changelog
index 677c6a1f5..19e694f8e 100644
--- a/far/changelog
+++ b/far/changelog
@@ -1,3 +1,8 @@
+--------------------------------------------------------------------------------
+drkns 2026-09-12 22:51:16+01:00 - build 6733
+
+1. Plugin API: ensure that Menu BreakCode is set to -1 when Menu was cancelled.
+
--------------------------------------------------------------------------------
drkns 2026-09-10 18:53:32+01:00 - build 6732
diff --git a/far/plugapi.cpp b/far/plugapi.cpp
index 862cc7021..64792e410 100644
--- a/far/plugapi.cpp
+++ b/far/plugapi.cpp
@@ -755,6 +755,9 @@ intptr_t WINAPI apiMenuFn(
return cpp_try(
[&]
{
+ if (BreakCode)
+ *BreakCode = -1;
+
if (Global->WindowManager->ManagerIsDown())
return -1;
@@ -781,9 +784,6 @@ intptr_t WINAPI apiMenuFn(
FarMenu->SetId(*Id);
}
- if (BreakCode)
- *BreakCode=-1;
-
{
const auto Topic = help::make_topic(UuidToPlugin(PluginId), NullToEmpty(HelpTopic));
if (!Topic.empty())
diff --git a/far/vbuild.m4 b/far/vbuild.m4
index a7ecce77a..9b6ecdf17 100644
--- a/far/vbuild.m4
+++ b/far/vbuild.m4
@@ -1 +1 @@
-6732
+6733