Ticket #4152: mc-4152-preserve-state-after-dropdown-break.patch

File mc-4152-preserve-state-after-dropdown-break.patch, 968 bytes (added by and, 3 years ago)
  • lib/widget/input.c

    From 0fc457933952d417c626798489afc14d06a8cc28 Mon Sep 17 00:00:00 2001
    From: Andreas Mohr <and@gmx.li>
    Date: Fri, 4 Dec 2020 12:05:15 +0000
    Subject: [PATCH] (input.c) preserve input state after history dropdown abort
    
    By default input value is marked to replace at whole until first input
    but history dropdown abort will alter this state
    
    fix #4152
    
    Signed-off-by: Andreas Mohr <and@gmx.li>
    ---
     lib/widget/input.c | 4 +---
     1 file changed, 1 insertion(+), 3 deletions(-)
    
    diff --git a/lib/widget/input.c b/lib/widget/input.c
    index b5cec7e6b..9293390f6 100644
    a b input_handle_char (WInput * in, int key) 
    11531153            input_complete_free (in); 
    11541154        input_execute_cmd (in, command); 
    11551155        v = MSG_HANDLED; 
    1156         if (in->first) 
    1157             input_update (in, TRUE);    /* needed to clear in->first */ 
    11581156    } 
    11591157 
    1160     input_update (in, TRUE); 
     1158    input_update (in, FALSE); 
    11611159    return v; 
    11621160} 
    11631161