mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 04:43:10 +00:00
fix logic
This commit is contained in:
parent
a02aa7a316
commit
5fadb7f200
1 changed files with 3 additions and 3 deletions
|
@ -391,7 +391,7 @@ static int print_max( const wchar_t *str, int max, int has_more )
|
|||
/**
|
||||
Print the specified item using at the specified amount of space
|
||||
*/
|
||||
static void completion_print_item( const wchar_t *prefix, comp_t *c, int width, bool primary )
|
||||
static void completion_print_item( const wchar_t *prefix, comp_t *c, int width, bool secondary )
|
||||
{
|
||||
int comp_width=0, desc_width=0;
|
||||
int written=0;
|
||||
|
@ -424,7 +424,7 @@ static void completion_print_item( const wchar_t *prefix, comp_t *c, int width,
|
|||
|
||||
}
|
||||
|
||||
rgb_color_t bg = primary ? rgb_color_t::normal() : get_color(HIGHLIGHT_PAGER_SECONDARY);
|
||||
rgb_color_t bg = secondary ? get_color(HIGHLIGHT_PAGER_SECONDARY) : rgb_color_t::normal();
|
||||
for( size_t i=0; i<c->comp.size(); i++ )
|
||||
{
|
||||
const wcstring &comp = c->comp.at(i);
|
||||
|
@ -457,7 +457,7 @@ static void completion_print_item( const wchar_t *prefix, comp_t *c, int width,
|
|||
writech( L' ');
|
||||
}
|
||||
}
|
||||
if ( !primary )
|
||||
if ( secondary )
|
||||
set_color( rgb_color_t::normal(), rgb_color_t::normal() );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue