Ticket #21: 0001-add-hotkey-M-C-for-hotlist.patch

File 0001-add-hotkey-M-C-for-hotlist.patch, 3.3 KB (added by iNode, 15 years ago)

add hotkey M-C-\ for hotlist

  • src/main.c

    From 9cc611a2001869d9cf3577bd1accfbae168d62f6 Mon Sep 17 00:00:00 2001
    From: Stan. S. Krupoderov <pashelper@gmail.com>
    Date: Mon, 22 Jun 2009 09:51:03 +0400
    Subject: [PATCH] add hotkey M-C-\ for hotlist
    
    ---
     src/main.c |   19 ++++++++++---------
     1 files changed, 10 insertions(+), 9 deletions(-)
    
    diff --git a/src/main.c b/src/main.c
    index c06dcee..efb08f2 100644
    a b  
    11/* Main program for the Midnight Commander 
    22   Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 
    33   2003, 2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc. 
    4     
     4 
    55   Written by: 1994, 1995, 1996, 1997 Miguel de Icaza 
    66               1994, 1995 Janne Kukonlehto 
    77               1997 Norbert Warmuth 
    8     
     8 
    99   This program is free software; you can redistribute it and/or modify 
    1010   it under the terms of the GNU General Public License as published by 
    1111   the Free Software Foundation; either version 2 of the License, or 
    1212   (at your option) any later version. 
    13     
     13 
    1414   This program is distributed in the hope that it will be useful, 
    1515   but WITHOUT ANY WARRANTY; without even the implied warranty of 
    1616   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    int mark_moves_down = 1; 
    137137/* If true, at startup the user-menu is invoked */ 
    138138int auto_menu = 0; 
    139139 
    140 /* If true, use + and \ keys normally and select/unselect do if M-+ / M-\  
     140/* If true, use + and \ keys normally and select/unselect do if M-+ / M-\ 
    141141   and M-- and keypad + / - */ 
    142142int alternate_plus_minus = 0; 
    143143 
    int navigate_with_arrows = 0; 
    185185/* If true use +, -, | for line drawing */ 
    186186int force_ugly_line_drawing = 0; 
    187187 
    188 /* If true program softkeys (HP terminals only) on startup and after every  
    189    command ran in the subshell to the description found in the termcap/terminfo  
     188/* If true program softkeys (HP terminals only) on startup and after every 
     189   command ran in the subshell to the description found in the termcap/terminfo 
    190190   database */ 
    191191int reset_hp_softkeys = 0; 
    192192 
    load_prompt (int fd, void *unused) 
    741741        winput_set_origin ((WInput *) cmdline, prompt_len, 
    742742                           COLS - prompt_len); 
    743743 
    744         /* since the prompt has changed, and we are called from one of the  
     744        /* since the prompt has changed, and we are called from one of the 
    745745         * get_event channels, the prompt updating does not take place 
    746746         * automatically: force a cursor update and a screen refresh 
    747747         */ 
    static const key_map default_map[] = { 
    13131313 
    13141314    /* To access the directory hotlist */ 
    13151315    {XCTRL ('\\'), quick_chdir_cmd}, 
     1316    {ALT(XCTRL ('\\')), quick_chdir_cmd}, 
    13161317 
    13171318    /* Suspend */ 
    13181319    {XCTRL ('z'), suspend_cmd}, 
    done_mc (void) 
    15341535     * We sync the profiles since the hotlist may have changed, while 
    15351536     * we only change the setup data if we have the auto save feature set 
    15361537     */ 
    1537      
     1538 
    15381539    if (auto_save_setup) 
    15391540        save_setup ();          /* does also call save_hotlist */ 
    15401541    else { 
    midnight_callback (struct Dlg_head *h, dlg_msg_t msg, int parm) 
    16351636                    return MSG_HANDLED; 
    16361637                } 
    16371638            } else if (!command_prompt || !cmdline->buffer[0]) { 
    1638                 /* Special treatement '+', '-', '\', '*' only when this is  
     1639                /* Special treatement '+', '-', '\', '*' only when this is 
    16391640                 * first char on input line 
    16401641                 */ 
    16411642