aboutsummaryrefslogtreecommitdiffhomepage
path: root/fish_pager.c
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2006-02-21 20:34:35 +1000
committerGravatar axel <axel@liljencrantz.se>2006-02-21 20:34:35 +1000
commit92aa99104a9de5fdcd09eb19bc0e403064cac18e (patch)
treeb9ef9cff2506544ede662da11411ff3b30b10e1e /fish_pager.c
parent6b544bc3c22a7256d012f92ad66234df51045bc5 (diff)
Fix rare accidental ellipsisizing of strings that will actually fit in fish_pager
darcs-hash:20060221103435-ac50b-f46a08e29e7860886a357bc1c5d314b594793e68.gz
Diffstat (limited to 'fish_pager.c')
-rw-r--r--fish_pager.c5
1 files changed, 3 insertions, 2 deletions
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; i<al_get_count( c->comp ); 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) );
}