Ticket #2164: mcview-room-for-cursor-after-percent.patch

File mcview-room-for-cursor-after-percent.patch, 914 bytes (added by egmont, 11 years ago)

view the percent by one character to the left

  • src/viewer/display.c

    diff -ur mc.orig/src/viewer/display.c mc/src/viewer/display.c
    old new  
    168168        tty_print_string (str_fit_to_term (file_label, width - 34, J_LEFT_FIT)); 
    169169    else 
    170170        tty_print_string (str_fit_to_term (file_label, width - 5, J_LEFT_FIT)); 
    171     if (width > 26) 
     171    if (width > 27) 
    172172        mcview_percent (view, view->hex_mode ? view->hex_cursor : view->dpy_end); 
    173173} 
    174174 
     
    398398    int percent; 
    399399    off_t filesize; 
    400400 
    401     if (height < 1 || right < 4) 
     401    if (height < 1 || right < 5) 
    402402        return; 
    403403    if (mcview_may_still_grow (view)) 
    404404        return; 
     
    411411    else 
    412412        percent = p * 100 / filesize; 
    413413 
    414     widget_move (view, top, right - 4); 
     414    widget_move (view, top, right - 5); 
    415415    tty_printf ("%3d%%", percent); 
    416416} 
    417417