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

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

    From 40b17d420ceb6e07cb2e22e60238929ab472d6e1 Mon Sep 17 00:00:00 2001
    From: Mooffie <mooffie@gmail.com>
    Date: Thu, 14 Jul 2016 22:47:10 +0300
    Subject: [PATCH] Ticket #3663: panelize resets marks on marked files.
    
    ---
     src/filemanager/panel.c | 9 ++++++---
     1 file changed, 6 insertions(+), 3 deletions(-)
    
    diff --git a/src/filemanager/panel.c b/src/filemanager/panel.c
    index 28cf315..eaf73c9 100644
    a b reload_panelized (WPanel * panel) 
    40544054    (void) mc_chdir (panel->cwd_vpath); 
    40554055 
    40564056    for (i = 0, j = 0; i < list->len; i++) 
    40574057    { 
    40584058        vfs_path_t *vpath; 
     4059        gboolean marked; 
    40594060 
    4060         if (list->list[i].f.marked) 
     4061        marked = list->list[i].f.marked; 
     4062 
     4063        if (marked) 
    40614064        { 
    40624065            /* Unmark the file in advance. In case the following mc_lstat 
    40634066             * 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"). 
     4067             * (Note: do_file_mark depends on a valid "list->list [i].st"). 
    40654068             * IMO that's the best way to update the panel's summary status 
    40664069             * -- Norbert 
    40674070             */ 
    40684071            do_file_mark (panel, i, 0); 
    40694072        } 
    40704073        vpath = vfs_path_from_str (list->list[i].fname); 
    40714074        if (mc_lstat (vpath, &list->list[i].st) != 0) 
    40724075            g_free (list->list[i].fname); 
    40734076        else 
    40744077        { 
    4075             if (list->list[i].f.marked) 
     4078            if (marked) 
    40764079                do_file_mark (panel, i, 1); 
    40774080            if (j != i) 
    40784081                list->list[j] = list->list[i]; 
    40794082            j++; 
    40804083        }