Ticket #2799: 99_detect_alt_editor.patch

File 99_detect_alt_editor.patch, 680 bytes (added by onlyjob, 12 years ago)

patch

  • src/args.c

    Last-Update: 2012-02-25
    Reviewed-by: Dmitry Smirnov <onlyjob@member.fsf.org>
    Forwarded: yes
    Bug-Debian: http://bugs.debian.org/592208
    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.
    
    
    a b  
    628628    base = x_basename (argv[0]); 
    629629    tmp = (argc > 0) ? argv[1] : NULL; 
    630630 
    631     if (strncmp (base, "mce", 3) == 0 || strcmp (base, "vi") == 0) 
     631    if (strncmp (base, "mce", 3) == 0 || strcmp (base, "vi") == 0 || strcmp (base, "editor") == 0) 
    632632    { 
    633633        /* mce* or vi is link to mc */ 
    634634