summaryrefslogtreecommitdiff
path: root/packages/mc/mc-4.6.2/00-76-utf8-hotlist-highlight.patch
blob: 38e0337ad6f7d6595be6915b20a902c412a2cd83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Highlight the lines of hotlist in full width.

================================================================================
--- mc-4.6.2/src/widget.c
+++ mc-4.6.2/src/widget.c
@@ -1994,6 +1994,7 @@
 {
     WLEntry *e;
     int i;
+    int j;
     int sel_line;
     Dlg_head *h = l->widget.parent;
     int normalc = DLG_NORMALC (h);
@@ -2024,7 +2025,8 @@
 	    text = e->text;
 	    e = e->next;
 	}
-	tty_printf (" %-*s ", l->width-2, name_trunc (text, l->width-2));
+	j = columns_to_bytes (name_trunc (text, l->width-2), l->width-2);
+	tty_printf (" %-*s ", j, name_trunc (text, l->width-2));
     }
     l->cursor_y = sel_line;
     if (!l->scrollbar)