From b04d568620df9ca22d8569154c7acb2f7ac1dd32 Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Wed, 23 Sep 2009 10:04:39 +0400 Subject: [PATCH] Ticket #1451: Incorrect charset menu location for 'Long file list' lising mode. In 'Long file list' the panel width is equal to the screen width. In this case, choose charset menu is placed in the center of the screen. Signed-off-by: Andrew Borodin --- src/screen.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/screen.c b/src/screen.c index fa496b2c9..45c401460 100644 --- a/src/screen.c +++ b/src/screen.c @@ -2683,7 +2683,9 @@ set_panel_encoding (WPanel *panel) 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; + offset = (panel->widget.cols == COLS) ? 0 + : (get_current_index () != 0) ? panel->widget.cols + : -panel->widget.cols; r = select_charset (offset, 0, source_codepage, FALSE); }