Merge branch '3663_panelize_keep_marked'

* 3663_panelize_keep_marked:
  Ticket #3663: panelize: don't reset marks on marked files.
This commit is contained in:
Andrew Borodin 2016-07-16 09:56:51 +03:00
commit 837a21009e
1 changed files with 2 additions and 12 deletions

View File

@ -3970,23 +3970,11 @@ reload_panelized (WPanel * panel)
{
vfs_path_t *vpath;
if (list->list[i].f.marked)
{
/* Unmark the file in advance. In case the following mc_lstat
* fails we are done, else we have to mark the file again
* (Note: do_file_mark depends on a valid "list->list [i].buf").
* IMO that's the best way to update the panel's summary status
* -- Norbert
*/
do_file_mark (panel, i, 0);
}
vpath = vfs_path_from_str (list->list[i].fname);
if (mc_lstat (vpath, &list->list[i].st) != 0)
g_free (list->list[i].fname);
else
{
if (list->list[i].f.marked)
do_file_mark (panel, i, 1);
if (j != i)
list->list[j] = list->list[i];
j++;
@ -3998,6 +3986,8 @@ reload_panelized (WPanel * panel)
else
list->len = j;
recalculate_panel_summary (panel);
if (panel != current_panel)
(void) mc_chdir (current_panel->cwd_vpath);
}