From 92aa99104a9de5fdcd09eb19bc0e403064cac18e Mon Sep 17 00:00:00 2001 From: axel Date: Tue, 21 Feb 2006 20:34:35 +1000 Subject: Fix rare accidental ellipsisizing of strings that will actually fit in fish_pager darcs-hash:20060221103435-ac50b-f46a08e29e7860886a357bc1c5d314b594793e68.gz --- fish_pager.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'fish_pager.c') diff --git a/fish_pager.c b/fish_pager.c index c545c7c3..724e65d2 100644 --- a/fish_pager.c +++ b/fish_pager.c @@ -289,12 +289,13 @@ static void completion_print_item( const wchar_t *prefix, comp_t *c, int width ) for( i=0; icomp ); i++ ) { + const wchar_t *comp = (const wchar_t *)al_get( c->comp, i ); if( i != 0 ) written += print_max( L" ", comp_width - written, 2 ); set_color( get_color(HIGHLIGHT_PAGER_PREFIX),FISH_COLOR_NORMAL ); - written += print_max( prefix, comp_width - written, 1 ); + written += print_max( prefix, comp_width - written, comp[0]?1:0 ); set_color( get_color(HIGHLIGHT_PAGER_COMPLETION),FISH_COLOR_IGNORE ); - written += print_max( (wchar_t *)al_get( c->comp, i ), comp_width - written, i!=(al_get_count(c->comp)-1) ); + written += print_max( comp, comp_width - written, i!=(al_get_count(c->comp)-1) ); } -- cgit v1.2.3