LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File _service:download_src_package:00-77-utf8-filename-search-highlight.patch of Package mc (Project home:eo4iwc:openSUSE11.3)

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;
     }