* screen.c (panel_callback): Only change directory on

WIDGET_FOCUS if current_panel changes.
This commit is contained in:
Pavel Roskin 2002-07-19 20:22:07 +00:00
parent 17671c4de9
commit f61bfaf8f5
2 changed files with 11 additions and 6 deletions

View File

@ -1,5 +1,8 @@
2002-07-19 Pavel Roskin <proski@gnu.org>
* screen.c (panel_callback): Only change directory on
WIDGET_FOCUS if current_panel changes.
* main.c (handle_args): Don't call mc_get_current_wd().
* main.c (directory_history_list): Report error if cannot change

View File

@ -2207,13 +2207,15 @@ panel_callback (Dlg_head *h, WPanel *panel, int msg, int par)
break;
case WIDGET_FOCUS:
current_panel = panel;
panel->active = 1;
if (mc_chdir (panel->cwd) != 0){
message (1, MSG_ERROR, _(" Cannot chdir to \"%s\" \n %s "),
panel->cwd, unix_error_string (errno));
} else
subshell_chdir (panel->cwd);
if (current_panel != panel) {
current_panel = panel;
if (mc_chdir (panel->cwd) != 0) {
message (1, MSG_ERROR, _(" Cannot chdir to \"%s\" \n %s "),
panel->cwd, unix_error_string (errno));
} else
subshell_chdir (panel->cwd);
}
show_dir (panel);
focus_select_item (panel);