1
1

* main.c (do_panel_cd): Record directory history for the panel

that changes the directory, not for the current panel.
Этот коммит содержится в:
Pavel Roskin 2003-02-18 06:43:04 +00:00
родитель 35895e3c10
Коммит 9cf0d2c60f
3 изменённых файлов: 12 добавлений и 4 удалений

@ -1,5 +1,8 @@
2003-02-18 Pavel Roskin <proski@gnu.org> 2003-02-18 Pavel Roskin <proski@gnu.org>
* 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 * widget.c (history_get): Use list_append_unique() for backward
compatibility. compatibility.

@ -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 Allow entering archives in VFS by Ctrl-PgDown with non-empty command
line. line.
Alt-O doesn't save new directory in the history.
Allow calling directory hotlist from Copy, Move and Find File dialogs. Allow calling directory hotlist from Copy, Move and Find File dialogs.
Allow modifiers for keys in mc.lib, like "shift-up". Allow modifiers for keys in mc.lib, like "shift-up".

@ -718,7 +718,10 @@ get_parent_dir_name (char *cwd, char *lwd)
return NULL; return NULL;
} }
/* Changes the current panel directory */ /*
* Changes the current directory of the panel.
* Don't record change in the directory history.
*/
static int static int
_do_panel_cd (WPanel *panel, char *new_dir, enum cd_enum cd_type) _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; return 1;
} }
/*
* Changes the current directory of the panel.
* Record change in the directory history.
*/
int int
do_panel_cd (struct WPanel *panel, char *new_dir, enum cd_enum cd_type) 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); r = _do_panel_cd (panel, new_dir, cd_type);
if (r) if (r)
directory_history_add (cpanel, cpanel->cwd); directory_history_add (panel, panel->cwd);
return r; return r;
} }