File: alt_editor.patch

package info (click to toggle)
mc 3%3A4.8.33-1%2Bdeb13u1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 23,536 kB
  • sloc: ansic: 100,652; sh: 8,463; perl: 2,339; makefile: 1,501; cs: 44; lisp: 44; sed: 16
file content (27 lines) | stat: -rw-r--r-- 1,013 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Last-Update: 2012-08-04
Reviewed-by: Dmitry Smirnov <onlyjob@member.fsf.org>
Forwarded: yes
Bug-Debian: http://bugs.debian.org/592208
Bug-MC: https://www.midnight-commander.org/ticket/2799
Bug-MC: https://www.midnight-commander.org/ticket/2638
Author: Yury V. Zaytsev <yury@shurup.com>
Description: Detect that mc was launched from alternatives symlink
 This patch in needed to mcedit to start if run as 'editor' symlink
 from alternatives.
 .
 As of 2012-05-01 upstream believe this should be customised per
 distribution as therefore refused to commit.

--- a/src/args.c
+++ b/src/args.c
@@ -597,9 +597,9 @@
         /* mcv* or view is link to mc */
         mc_global.mc_run_mode = MC_RUN_VIEWER;
     }
 #ifdef USE_INTERNAL_EDIT
-    else if (strncmp (base, "mce", 3) == 0 || strcmp (base, "vi") == 0)
+    else if (strncmp (base, "mce", 3) == 0 || strcmp (base, "vi") == 0 || strcmp (base, "editor") == 0)
     {
         /* mce* or vi is link to mc */
         mc_global.mc_run_mode = MC_RUN_EDITOR;
     }