[FarGroup/FarManager] master: Fix locked filter display in captionless menus (27dc43726)

0 views
Skip to first unread message

farg...@farmanager.com

unread,
Jan 28, 2026, 6:00:55 PM (9 days ago) Jan 28
to farco...@googlegroups.com
Repository : https://github.com/FarGroup/FarManager
On branch : master
Link : https://github.com/FarGroup/FarManager/commit/27dc43726f419c40059ff701eef60e0e67c70769

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

commit 27dc43726f419c40059ff701eef60e0e67c70769
Author: Alex Alabuzhev <alab...@gmail.com>
Date: Wed Jan 28 22:46:26 2026 +0000

Fix locked filter display in captionless menus


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

27dc43726f419c40059ff701eef60e0e67c70769
far/changelog | 5 +++++
far/vbuild.m4 | 2 +-
far/vmenu.cpp | 18 ++++++++++--------
3 files changed, 16 insertions(+), 9 deletions(-)

diff --git a/far/changelog b/far/changelog
index f0902619e..bcf8bb1a5 100644
--- a/far/changelog
+++ b/far/changelog
@@ -1,3 +1,8 @@
+--------------------------------------------------------------------------------
+drkns 2026-01-28 22:43:59+00:00 - build 6638
+
+1. Fix locked filter display in captionless menus.
+
--------------------------------------------------------------------------------
drkns 2026-01-21 21:55:16+00:00 - build 6637

diff --git a/far/vbuild.m4 b/far/vbuild.m4
index 82f2e4753..2047e9c6c 100644
--- a/far/vbuild.m4
+++ b/far/vbuild.m4
@@ -1 +1 @@
-6637
+6638
diff --git a/far/vmenu.cpp b/far/vmenu.cpp
index 590d99511..b8cf186e7 100644
--- a/far/vmenu.cpp
+++ b/far/vmenu.cpp
@@ -2706,19 +2706,21 @@ void VMenu::DrawTitles() const

if (!strTitle.empty() || bFilterEnabled)
{
- string strDisplayTitle = strTitle;
+ string strDisplayTitle;
+ string_view DisplayTitle;

if (bFilterEnabled)
{
- if (bFilterLocked)
- strDisplayTitle += L' ';
- else
- strDisplayTitle.clear();
+ strDisplayTitle = bFilterLocked?
+ far::format(L"{}{}<{}>"sv, strTitle, strTitle.empty()? L""sv : L" "sv, strFilter) :
+ far::format(L"[{}]"sv, strFilter);

- append(strDisplayTitle, bFilterLocked? L'<' : L'[', strFilter, bFilterLocked? L'>' : L']');
+ DisplayTitle = strDisplayTitle;
}
+ else
+ DisplayTitle = strTitle;

- auto WidthTitle = static_cast<int>(visual_string_length(strDisplayTitle));
+ auto WidthTitle = static_cast<int>(visual_string_length(DisplayTitle));

if (WidthTitle > MaxTitleLength)
WidthTitle = MaxTitleLength - 1;
@@ -2727,7 +2729,7 @@ void VMenu::DrawTitles() const
set_color(Colors, color_indices::Title);

Text(L' ');
- Text(strDisplayTitle, MaxTitleLength - 1);
+ Text(DisplayTitle, MaxTitleLength - 1);
Text(L' ');
}



Reply all
Reply to author
Forward
0 new messages