diff options
author | axel <axel@liljencrantz.se> | 2006-09-04 09:12:09 +1000 |
---|---|---|
committer | axel <axel@liljencrantz.se> | 2006-09-04 09:12:09 +1000 |
commit | 9a7be6db080613441df98d29b2225aa731ba5a45 (patch) | |
tree | a06596280ed422bf1debd97ee48a5a5b208304fa /fish_pager.c | |
parent | 40e202532723bac8317e296bb3b44aba89d3da05 (diff) |
New status message for fish_pager
darcs-hash:20060903231209-ac50b-b8bad71cb9194a905918534fafec619118d61e21.gz
Diffstat (limited to 'fish_pager.c')
-rw-r--r-- | fish_pager.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/fish_pager.c b/fish_pager.c index 87970b2d..855fd14b 100644 --- a/fish_pager.c +++ b/fish_pager.c @@ -583,14 +583,13 @@ static int completion_try_print( int cols, */ while(do_loop) { - wchar_t msg[10]; - int percent = 100*pos/(rows-termsize.ws_row+1); + wchar_t msg[30]; + int percent = 100*(pos+rows)/(2*rows-termsize.ws_row+1); set_color( FISH_COLOR_BLACK, get_color(HIGHLIGHT_PAGER_PROGRESS) ); - swprintf( msg, 12, - L" %ls(%d%%) \r", - percent==100?L"":(percent >=10?L" ": L" "), - percent ); + swprintf( msg, 30, + L" %d to %d of %d \r", + pos, pos+termsize.ws_row-1, rows ); writestr(msg); set_color( FISH_COLOR_NORMAL, FISH_COLOR_NORMAL ); pager_flush(); |