Ticket #3663: 3663-panelize-resets-marks-on-marked-files--v2.patch

File 3663-panelize-resets-marks-on-marked-files--v2.patch, 1.6 KB (added by mooffie, 8 years ago)
  • src/filemanager/panel.c

    From 583c6a9f3d6bfbaa810f163328f36356ec55b52e Mon Sep 17 00:00:00 2001
    From: Mooffie <mooffie@gmail.com>
    Date: Thu, 14 Jul 2016 22:56:58 +0300
    Subject: [PATCH] Ticket #3663: panelize resets marks on marked files.
    
    ---
     src/filemanager/panel.c | 14 ++------------
     1 file changed, 2 insertions(+), 12 deletions(-)
    
    diff --git a/src/filemanager/panel.c b/src/filemanager/panel.c
    index 28cf315..3c98598 100644
    a b reload_panelized (WPanel * panel) 
    40574057    { 
    40584058        vfs_path_t *vpath; 
    40594059 
    4060         if (list->list[i].f.marked) 
    4061         { 
    4062             /* Unmark the file in advance. In case the following mc_lstat 
    4063              * fails we are done, else we have to mark the file again 
    4064              * (Note: do_file_mark depends on a valid "list->list [i].buf"). 
    4065              * IMO that's the best way to update the panel's summary status 
    4066              * -- Norbert 
    4067              */ 
    4068             do_file_mark (panel, i, 0); 
    4069         } 
    40704060        vpath = vfs_path_from_str (list->list[i].fname); 
    40714061        if (mc_lstat (vpath, &list->list[i].st) != 0) 
    40724062            g_free (list->list[i].fname); 
    40734063        else 
    40744064        { 
    4075             if (list->list[i].f.marked) 
    4076                 do_file_mark (panel, i, 1); 
    40774065            if (j != i) 
    40784066                list->list[j] = list->list[i]; 
    40794067            j++; 
    reload_panelized (WPanel * panel) 
    40854073    else 
    40864074        list->len = j; 
    40874075 
     4076    recalculate_panel_summary (panel); 
     4077 
    40884078    if (panel != current_panel) 
    40894079        (void) mc_chdir (current_panel->cwd_vpath); 
    40904080}