From 9cf0d2c60f9c772a00a6d030f1be986385e4db10 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Tue, 18 Feb 2003 06:43:04 +0000 Subject: [PATCH] * main.c (do_panel_cd): Record directory history for the panel that changes the directory, not for the current panel. --- src/ChangeLog | 3 +++ src/TODO | 2 -- src/main.c | 11 +++++++++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index f4248b157..c8732ffad 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2003-02-18 Pavel Roskin + * main.c (do_panel_cd): Record directory history for the panel + that changes the directory, not for the current panel. + * widget.c (history_get): Use list_append_unique() for backward compatibility. diff --git a/src/TODO b/src/TODO index bbc509b60..a99cd51e5 100644 --- a/src/TODO +++ b/src/TODO @@ -6,8 +6,6 @@ Allow navigating VFS directories by Enter with non-empty command line. Allow entering archives in VFS by Ctrl-PgDown with non-empty command line. -Alt-O doesn't save new directory in the history. - Allow calling directory hotlist from Copy, Move and Find File dialogs. Allow modifiers for keys in mc.lib, like "shift-up". diff --git a/src/main.c b/src/main.c index acf0f5499..262f35a9f 100644 --- a/src/main.c +++ b/src/main.c @@ -718,7 +718,10 @@ get_parent_dir_name (char *cwd, char *lwd) return NULL; } -/* Changes the current panel directory */ +/* + * Changes the current directory of the panel. + * Don't record change in the directory history. + */ static int _do_panel_cd (WPanel *panel, char *new_dir, enum cd_enum cd_type) { @@ -784,6 +787,10 @@ _do_panel_cd (WPanel *panel, char *new_dir, enum cd_enum cd_type) return 1; } +/* + * Changes the current directory of the panel. + * Record change in the directory history. + */ int do_panel_cd (struct WPanel *panel, char *new_dir, enum cd_enum cd_type) { @@ -791,7 +798,7 @@ do_panel_cd (struct WPanel *panel, char *new_dir, enum cd_enum cd_type) r = _do_panel_cd (panel, new_dir, cd_type); if (r) - directory_history_add (cpanel, cpanel->cwd); + directory_history_add (panel, panel->cwd); return r; }