Repository :
https://github.com/FarGroup/FarManager
On branch : master
Link :
https://github.com/FarGroup/FarManager/commit/c3410ff5dcf7130b2866675c56f2ed495598671f
>---------------------------------------------------------------
commit c3410ff5dcf7130b2866675c56f2ed495598671f
Author: Vadim Yegorov <
z...@bmg.lv>
Date: Mon Dec 1 22:07:23 2025 +0200
1. EOPT_SHOWLINENUMBERS and ESPT_SHOWLINENUMBERS are added to API.
>---------------------------------------------------------------
c3410ff5dcf7130b2866675c56f2ed495598671f
far/changelog | 5 +++++
far/editor.cpp | 7 +++++++
far/editor.hpp | 1 +
far/plugin.hpp | 2 ++
far/vbuild.m4 | 2 +-
5 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/far/changelog b/far/changelog
index d2c432575..6108ea00f 100644
--- a/far/changelog
+++ b/far/changelog
@@ -1,3 +1,8 @@
+--------------------------------------------------------------------------------
+zg 2025-12-01 22:05:24+02:00 - build 6606
+
+1. EOPT_SHOWLINENUMBERS and ESPT_SHOWLINENUMBERS are added to API.
+
--------------------------------------------------------------------------------
yulian5 2025-11-29 19:29:09-09:00 - build 6605
diff --git a/far/editor.cpp b/far/editor.cpp
index 711cb8a13..b3cb3593d 100644
--- a/far/editor.cpp
+++ b/far/editor.cpp
@@ -5625,6 +5625,9 @@ int Editor::EditorControl(int Command, intptr_t Param1, void *Param2)
Info->Options|=EOPT_SHOWLINEBREAK;
}
+ if (GetShowLineNumbers())
+ Info->Options|=EOPT_SHOWLINENUMBERS;
+
if (EdOpt.ShowScrollBar && ScrollBarRequired(ObjHeight(), Lines.size()))
Info->Options |= EOPT_SHOWSCROLLBAR;
@@ -5951,6 +5954,10 @@ int Editor::EditorControl(int Command, intptr_t Param1, void *Param2)
SetShowWhiteSpace(espar->iParam);
return true;
+ case ESPT_SHOWLINENUMBERS:
+ SetShowLineNumbers(espar->iParam);
+ return true;
+
default:
return false;
}
diff --git a/far/editor.hpp b/far/editor.hpp
index 35cbed4c0..40c763eba 100644
--- a/far/editor.hpp
+++ b/far/editor.hpp
@@ -97,6 +97,7 @@ public:
void SetCharCodeBase(int NewMode) { EdOpt.CharCodeBase = NewMode % 3; }
int GetCharCodeBase() const { return EdOpt.CharCodeBase; }
void SetShowScrollBar(bool NewMode) { EdOpt.ShowScrollBar = NewMode; }
+ void SetShowLineNumbers(bool NewMode) { EdOpt.ShowLineNumbers = NewMode; }
bool GetShowLineNumbers() const { return EdOpt.ShowLineNumbers; }
void SetSearchCursorAtEnd(bool NewMode) { EdOpt.SearchCursorAtEnd = NewMode; }
void SetWordDiv(string_view const WordDiv) { EdOpt.strWordDiv = string(WordDiv); }
diff --git a/far/plugin.hpp b/far/plugin.hpp
index 97e11bbcc..f8c6c8300 100644
--- a/far/plugin.hpp
+++ b/far/plugin.hpp
@@ -1866,6 +1866,7 @@ enum EDITOR_SETPARAMETER_TYPES
ESPT_GETWORDDIV = 9,
ESPT_SHOWWHITESPACE = 10,
ESPT_SETBOM = 11,
+ ESPT_SHOWLINENUMBERS = 12,
};
#ifdef FAR_USE_INTERNALS
@@ -1957,6 +1958,7 @@ enum EDITOR_OPTIONS
EOPT_SHOWTITLEBAR = 0x00000800,
EOPT_SHOWKEYBAR = 0x00001000,
EOPT_SHOWSCROLLBAR = 0x00002000,
+ EOPT_SHOWLINENUMBERS = 0x00004000,
};
diff --git a/far/vbuild.m4 b/far/vbuild.m4
index 0eb9fe5ae..9292fcae6 100644
--- a/far/vbuild.m4
+++ b/far/vbuild.m4
@@ -1 +1 @@
-6605
+6606