Make sure case sensitive completions are ignored by the pager if case sensitive completions exist

darcs-hash:20080109000928-75c98-fc6dc6fcebca99f33a1ed484444efee87f5caa94.gz
This commit is contained in:
liljencrantz 2008-01-09 10:09:28 +10:00
parent 5379200b9e
commit b4042b18c6

View file

@ -1091,7 +1091,8 @@ static void run_pager( wchar_t *prefix, int is_quoted, array_list_t *comp )
char *foo;
io_data_t *in;
wchar_t *escaped_separator;
int has_case_sensitive=0;
if( !prefix || (wcslen(prefix)==0))
{
prefix_esc = wcsdup(L"\"\"");
@ -1116,6 +1117,12 @@ static void run_pager( wchar_t *prefix, int is_quoted, array_list_t *comp )
escaped_separator = escape( COMPLETE_SEP_STR, 1);
for( i=0; i<al_get_count( comp ); i++ )
{
completion_t *el = (completion_t *)al_get( comp, i );
has_case_sensitive |= !(el->flags & COMPLETE_NO_CASE );
}
for( i=0; i<al_get_count( comp ); i++ )
{
@ -1125,6 +1132,11 @@ static void run_pager( wchar_t *prefix, int is_quoted, array_list_t *comp )
wchar_t *foo=0;
wchar_t *baz=0;
if( has_case_sensitive && (el->flags & COMPLETE_NO_CASE ))
{
continue;
}
if( el && el->completion )
{
if( el->flags & COMPLETE_NO_CASE )