mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 04:46:55 +03:00
* screen.c (panel_callback): Only change directory on
WIDGET_FOCUS if current_panel changes.
This commit is contained in:
parent
17671c4de9
commit
f61bfaf8f5
@ -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
|
||||
|
14
src/screen.c
14
src/screen.c
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user