blob: f1b0f344872133e6b0c9dd8e56120cd2ab863da7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
http://bugs.gentoo.org/show_bug.cgi?id=282556
http://www.midnight-commander.org/ticket/1451
diff -ur mc-4.7.0-pre2.orig/src/screen.c mc-4.7.0-pre2/src/screen.c
--- mc-4.7.0-pre2.orig/src/screen.c 2009-08-23 23:17:14.000000000 +0300
+++ mc-4.7.0-pre2/src/screen.c 2009-09-04 15:59:56.000000000 +0300
@@ -2702,10 +2702,16 @@
char *cd_path;
#ifdef HAVE_CHARSET
const char *errmsg;
+ int offset;
int r;
- int width = (panel->widget.x)? panel->widget.cols : panel->widget.cols * (-1);
- r = select_charset (width, 0, source_codepage, FALSE);
+ if (horizontal_split) {
+ offset = (get_current_index () != 0) ? panel->widget.lines : -panel->widget.lines;
+ r = select_charset (0, offset, source_codepage, FALSE);
+ } else {
+ offset = (get_current_index () != 0) ? panel->widget.cols : -panel->widget.cols;
+ r = select_charset (offset, 0, source_codepage, FALSE);
+ }
if (r == SELECT_CHARSET_CANCEL)
return; /* Cancel */
|