From: Dmitry Shachnev <mitya57@debian.org>
Date: Tue, 28 Oct 2025 15:27:05 +0300
Subject: Run in editor mode when called as /usr/bin/editor symlink

In Debian, /usr/bin/editor is managed by alternatives system, and
I am going to register far2ledit as a possible alternative for that.

Forwarded: https://github.com/elfmz/far2l/pull/3022
---
 far2l/src/main.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/far2l/src/main.cpp b/far2l/src/main.cpp
index 4dcc5c1..2b13f64 100644
--- a/far2l/src/main.cpp
+++ b/far2l/src/main.cpp
@@ -87,7 +87,7 @@ int DirectRT = 0;
 
 static void print_help(const char *self)
 {
-	bool is_far2ledit = strstr(self, "far2ledit") != NULL;
+	bool is_far2ledit = strstr(self, "edit") != NULL;
 	printf("FAR2L Version: %s\n"
 			"FAR2L - two-panel file manager, with built-in terminal and other usefulness'es\n"
 			"Usage: %s [switches] [-cd apath [-cd ppath]]\n"
@@ -457,7 +457,7 @@ int FarAppMain(int argc, char **argv)
 	}
 
 	// run by symlink in editor mode
-	bool is_far2ledit = strstr(argv[0], "far2ledit") != NULL;
+	bool is_far2ledit = strstr(argv[0], "edit") != NULL;
 	if (is_far2ledit) {
 		Opt.OnlyEditorViewerUsed = Options::ONLY_EDITOR;
 		if (argc > 1) {
