Repository :
https://github.com/FarGroup/FarManager
On branch : master
Link :
https://github.com/FarGroup/FarManager/commit/fbe5928de3b647cfd845b4e5a5ac794815807e9b
>---------------------------------------------------------------
commit fbe5928de3b647cfd845b4e5a5ac794815807e9b
Author: Alex Alabuzhev <
alab...@gmail.com>
Date: Fri Dec 5 19:24:29 2025 +0000
Fix another corner case with editor line numbers
>---------------------------------------------------------------
fbe5928de3b647cfd845b4e5a5ac794815807e9b
far/changelog | 5 +++++
far/edit.cpp | 6 ++----
far/vbuild.m4 | 2 +-
3 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/far/changelog b/far/changelog
index f5d784abc..14f28563b 100644
--- a/far/changelog
+++ b/far/changelog
@@ -1,3 +1,8 @@
+--------------------------------------------------------------------------------
+drkns 2025-12-05 19:23:22+00:00 - build 6612
+
+1. Fix another corner case with editor line numbers.
+
--------------------------------------------------------------------------------
drkns 2025-12-04 21:58:24+00:00 - build 6611
diff --git a/far/edit.cpp b/far/edit.cpp
index 48b7cb9c1..168c64be1 100644
--- a/far/edit.cpp
+++ b/far/edit.cpp
@@ -2127,10 +2127,8 @@ void Edit::ApplyColor(std::multiset<ColorItem> const& Colors, int XPos, int Focu
LastLast = CurItem.Flags & ECF_TABMARKFIRST? TabVisualFirst : TabVisualLast;
}
- First -= FocusedLeftPos;
- LastLast -= FocusedLeftPos;
-
- LastLast = std::min(LastLast, Width - 1);
+ First = std::max(0, First - FocusedLeftPos);
+ LastLast = std::clamp(LastLast - FocusedLeftPos, 0, Width - 1);
Global->ScrBuf->ApplyColor({ m_Where.left + First, m_Where.top, m_Where.left + LastLast, m_Where.top }, CurItem.GetColor());
}
diff --git a/far/vbuild.m4 b/far/vbuild.m4
index 8755c7be2..09596ee1f 100644
--- a/far/vbuild.m4
+++ b/far/vbuild.m4
@@ -1 +1 @@
-6611
+6612