From 05661eda1df0b7aaa258e386ce813f92d6d48188 Mon Sep 17 00:00:00 2001 From: Mooffie Date: Sun, 15 Jan 2017 23:51:45 +0200 Subject: [PATCH] Ticket #3757: cannot show more than one column in user defined listing mode. In user-defined listing mode, the format string lets us specify how many columns to display. E.g., for 3 columns: "half 3 type name | size | perm" However, parse_panel_size() reads this digit only when `panel->list_type == list_brief`. We remove this check. Incidentally, the assignment there to `panel->brief_cols` isn't needed. In list_brief mode, `panel->brief_cols` is already set. We also fix a related problem in the mouse handler: it erroneously assumes `panel->list_cols > 1` happens only in list_brief mode. (These bugs were introduced in commit fb474bc1c157.) Signed-off-by: Mooffie --- src/filemanager/panel.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/filemanager/panel.c b/src/filemanager/panel.c index a18260a15..927394282 100644 --- a/src/filemanager/panel.c +++ b/src/filemanager/panel.c @@ -1645,13 +1645,11 @@ parse_panel_size (WPanel * panel, const char *format, gboolean isstatus) if (g_ascii_isdigit (*format)) { - if (!isstatus && panel->list_type == list_brief) + if (!isstatus) { - panel->brief_cols = g_ascii_digit_value (*format); - if (panel->brief_cols < 1) - panel->brief_cols = 1; - - panel->list_cols = panel->brief_cols; + panel->list_cols = g_ascii_digit_value (*format); + if (panel->list_cols < 1) + panel->list_cols = 1; } format++; @@ -3874,7 +3872,7 @@ panel_mouse_callback (Widget * w, mouse_msg_t msg, mouse_event_t * event) { my_index = panel->top_file + y; - if (panel->list_type == list_brief && panel->list_cols > 1) + if (panel->list_cols > 1) { int width, lines;