+++ /dev/null
-diff -ur mc-4.6.0.orig/doc/mc.1.in mc-4.6.0/doc/mc.1.in
---- mc-4.6.0.orig/doc/mc.1.in Fri Nov 21 22:58:36 2003
-+++ mc-4.6.0/doc/mc.1.in Fri Nov 21 23:55:51 2003
-@@ -431,10 +431,14 @@
- move the selection bar one page up.
- .TP
- .B M-o
--make the current directory of the current panel also the current
--directory of the other panel. Put the other panel to the listing mode
--if needed. If the current panel is panelized, the other panel doesn't
--become panelized.
-+depending of the 'chdir other panel' option: If the other panel is a listing
-+panel and you are standing on a directory in the current panel, then the other
-+panel contents are set to the contents of the currently selected directory
-+(like Emacs' dired C-o key) otherwise the other panel contents are set to the
-+parent dir of the current dir. Or make the current directory of the current
-+panel also the current directory of the other panel. Put the other panel to
-+the listing mode if needed. If the current panel is panelized, the other panel
-+doesn't become panelized.
- .TP
- .B C-PageUp, C-PageDown
- only when supported by the terminal: change to ".." and to the currently
-@@ -1556,6 +1560,16 @@
- Panel Options, Pause after run and Other Options.
- .PP
- .B Panel Options
-+.PP
-+.I chdir Other Panel.
-+Controls M-O behaviour.
-+If enabled, the Midnight Commander will set the contents
-+of the other panel to the contents of the currently selected
-+directory (like Emacs' dired C-o key) or the other panel contents
-+are set to the parent dir of the current dir depending if you are
-+standing on a directory in the current panel.
-+If disabled the Midnight Commander will make the current directory
-+of the current panel also the current directory of the other panel.
- .PP
- .I Show Backup Files.
- If enabled, the Midnight Commander will show files ending with a tilde.
-diff -ur mc-4.6.0.orig/doc/pl/mc.1.in mc-4.6.0/doc/pl/mc.1.in
---- mc-4.6.0.orig/doc/pl/mc.1.in Thu Jan 16 11:30:58 2003
-+++ mc-4.6.0/doc/pl/mc.1.in Fri Nov 21 23:55:51 2003
-@@ -1322,6 +1322,15 @@
- .PP
- .B Opcje panelu
- .PP
-+.I chdir Other Panel.
-+Wyznacza zachowanie M-O.
-+Jesli jest w³±czona, Midnight Commander wy¶wietli w drugim panelu
-+zawarto¶æ aktualnie zaznaczonego katalogu (tak jak kombinaca C-o
-+w Emacsie) albo katalog o jedno piêtro wy¿szy od aktualnego jesli
-+aktualnie nie jest zaznaczony katalog.
-+Jesli opcja jest wy³±czona Midnight Commander wy¶wietli w drugim panelu
-+zawarto¶æ tego samego katalogu co w aktualnym.
-+.PP
- .I Show Backup Files.
- Standardowo Midnight Commander nie wy¶wietla plików koñcz±cych siê znakiem
- '~' (tak jak komenda ls -B w wersji GNU).
-diff -ur mc-4.6.0.orig/src/main.c mc-4.6.0/src/main.c
---- mc-4.6.0.orig/src/main.c Fri Nov 21 22:58:37 2003
-+++ mc-4.6.0/src/main.c Fri Nov 21 23:55:51 2003
-@@ -133,6 +133,9 @@
- /* If true, marking a files moves the cursor down */
- int mark_moves_down = 1;
-
-+/* If true chdir up or down in other panel on alt-o (pre 5.6.0 behaviour */
-+int chdir_other_panel_old = 1;
-+
- /* If true, at startup the user-menu is invoked */
- int auto_menu = 0;
-
-diff -ur mc-4.6.0.orig/src/main.h mc-4.6.0/src/main.h
---- mc-4.6.0.orig/src/main.h Wed Feb 5 16:54:34 2003
-+++ mc-4.6.0/src/main.h Fri Nov 21 23:55:51 2003
-@@ -35,6 +35,7 @@
-
- /* See main.c for details on these variables */
- extern int mark_moves_down;
-+extern int chdir_other_panel_old;
- extern int auto_menu;
- extern int pause_after_run;
- extern int auto_save_setup;
---- ./src/option.c.amc 2005-06-10 15:44:46.500942768 +0200
-+++ ./src/option.c 2005-06-10 15:50:58.240429776 +0200
-@@ -72,12 +72,13 @@
- {N_("ma&Rk moves down"), &mark_moves_down, TOGGLE_VARIABLE, 0 },
- {N_("show &Hidden files"), &show_dot_files, toggle_show_hidden, 0 },
- {N_("show &Backup files"), &show_backups, toggle_show_backup, 0 },
-+ {N_("chdir &Other panel"), &chdir_other_panel_old,TOGGLE_VARIABLE, 0, "chdir-old" },
- { 0, 0, 0, 0 }
- };
-
- /* Make sure this corresponds to the check_options structure */
- #define OTHER_OPTIONS 12
--#define PANEL_OPTIONS 6
-+#define PANEL_OPTIONS 7
-
- static WRadio *pause_radio;
-
---- ./src/screen.c.amc 2005-06-10 15:44:53.990804136 +0200
-+++ ./src/screen.c 2005-06-10 16:14:09.406940320 +0200
-@@ -1993,15 +1993,32 @@
- static void
- chdir_other_panel (WPanel *panel)
- {
-+ char *new_dir;
-+
- if (get_other_type () != view_listing) {
- set_display_type (get_other_index (), view_listing);
- }
-
- do_panel_cd (other_panel, current_panel->cwd, cd_exact);
-
-- /* try to select current filename on the other panel */
-- if (!panel->is_panelized) {
-- try_to_select (other_panel, selection (panel)->fname);
-+ if ( chdir_other_panel_old ) {
-+ if (!S_ISDIR (panel->dir.list [panel->selected].st.st_mode))
-+ new_dir = concat_dir_and_file (panel->cwd, "..");
-+ else
-+ new_dir = concat_dir_and_file (panel->cwd, panel->dir.list [panel->selected].fname);
-+
-+ change_panel ();
-+ do_cd (new_dir, cd_exact);
-+ change_panel ();
-+
-+ move_down (panel);
-+
-+ g_free (new_dir);
-+ } else {
-+ /* try to select current filename on the other panel */
-+ if (!panel->is_panelized) {
-+ try_to_select (other_panel, selection (panel)->fname);
-+ }
- }
- }
-
-diff -ur mc-4.6.0.orig/src/setup.c mc-4.6.0/src/setup.c
---- mc-4.6.0.orig/src/setup.c Fri Nov 21 22:58:37 2003
-+++ mc-4.6.0/src/setup.c Sat Nov 22 00:04:46 2003
-@@ -141,6 +141,7 @@
- char *opt_name;
- int *opt_addr;
- } options [] = {
-+ { "chdir_other_panel", &chdir_other_panel_old },
- { "show_backups", &show_backups },
- { "show_dot_files", &show_dot_files },
- { "verbose", &verbose },