aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/mc/mc-4.6.2/00-77-utf8-filename-search-highlight.patch
blob: 912d8eb72b34cd72069954a7bb7c72d0be8a4c91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Quick filename search (^S) highlights correct width.

================================================================================
--- mc-4.6.2/src/screen.c
+++ mc-4.6.2/src/screen.c
@@ -771,8 +771,10 @@
     widget_move (&panel->widget, llines (panel)+3, 1);
 
     if (panel->searching){
+	int j;
 	attrset (INPUT_COLOR);
-	tty_printf ("/%-*s", panel->widget.cols-3, panel->search_buffer);
+	j = columns_to_bytes (panel->search_buffer, panel->widget.cols-3);
+	tty_printf ("/%-*s", j, panel->search_buffer);
 	attrset (NORMAL_COLOR);
 	return;
     }