Ticket #257: 00-76-utf8-hotlist-highlight.patch

File 00-76-utf8-hotlist-highlight.patch, 716 bytes (added by egmont, 16 years ago)

Fix hotlist entries

  • src/widget.c

    Highlight the lines of hotlist in full width.
    
    diff -Naur mc-4.6.2.orig/src/widget.c mc-4.6.2/src/widget.c
    old new  
    20272027{ 
    20282028    WLEntry *e; 
    20292029    int i; 
     2030    int j; 
    20302031    int sel_line; 
    20312032    Dlg_head *h = l->widget.parent; 
    20322033    int normalc = DLG_NORMALC (h); 
     
    20572058            text = e->text; 
    20582059            e = e->next; 
    20592060        } 
    2060         tty_printf (" %-*s ", l->width-2, name_trunc (text, l->width-2)); 
     2061        j = columns_to_bytes (name_trunc (text, l->width-2), l->width-2); 
     2062        tty_printf (" %-*s ", j, name_trunc (text, l->width-2)); 
    20612063    } 
    20622064    l->cursor_y = sel_line; 
    20632065    if (!l->scrollbar)