mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-21 12:21:10 +08:00
Fix bug in completion pager where non-ascii characters where escaped because the locale was set after the completion strings where read in. Thanks to mikeX for the report.
darcs-hash:20070103125702-ac50b-752f6e1182dba4356e068191b52fdb05d3cb5649.gz
This commit is contained in:
parent
2ec7428e32
commit
9c23d50e92
@ -916,6 +916,7 @@ static void mangle_completions( array_list_t *l, const wchar_t *prefix )
|
||||
{
|
||||
*end = 0;
|
||||
wchar_t * str = escape( start, 1 );
|
||||
|
||||
comp->comp_width += my_wcswidth( str );
|
||||
halloc_register( global_context, str );
|
||||
al_push( comp->comp, str );
|
||||
@ -981,7 +982,6 @@ static void init()
|
||||
|
||||
|
||||
program_name = L"fish_pager";
|
||||
wsetlocale( LC_ALL, L"" );
|
||||
|
||||
/*
|
||||
Make fd 1 output to screen, and use some other fd for writing
|
||||
@ -1156,6 +1156,7 @@ int main( int argc, char **argv )
|
||||
else
|
||||
{
|
||||
|
||||
wsetlocale( LC_ALL, L"" );
|
||||
comp = al_halloc( global_context );
|
||||
prefix = str2wcs( argv[2] );
|
||||
is_quoted = strcmp( "1", argv[1] )==0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user