mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-14 14:03:58 +00:00
Do not use INTERNAL_SEPARATOR tokens to separate different parts of an unescaped string when unescape_special is false. This fixes a bug where weird characters would sometimes be printed in completion descriptions
darcs-hash:20061009151913-ac50b-47a9d3274b2399cef6fd0e12a908a606da2c4903.gz
This commit is contained in:
parent
80ac4ddc2b
commit
f85ce201ee
1 changed files with 10 additions and 5 deletions
5
common.c
5
common.c
|
@ -1015,6 +1015,7 @@ wchar_t *unescape( const wchar_t * orig, int unescape_special )
|
|||
|
||||
default:
|
||||
{
|
||||
if( unescape_special )
|
||||
in[out_pos++] = INTERNAL_SEPARATOR;
|
||||
in[out_pos]=in[in_pos];
|
||||
break;
|
||||
|
@ -1140,6 +1141,7 @@ wchar_t *unescape( const wchar_t * orig, int unescape_special )
|
|||
case L'\'':
|
||||
{
|
||||
mode = 1;
|
||||
if( unescape_special )
|
||||
in[out_pos] = INTERNAL_SEPARATOR;
|
||||
break;
|
||||
}
|
||||
|
@ -1147,6 +1149,7 @@ wchar_t *unescape( const wchar_t * orig, int unescape_special )
|
|||
case L'\"':
|
||||
{
|
||||
mode = 2;
|
||||
if( unescape_special )
|
||||
in[out_pos] = INTERNAL_SEPARATOR;
|
||||
break;
|
||||
}
|
||||
|
@ -1194,6 +1197,7 @@ wchar_t *unescape( const wchar_t * orig, int unescape_special )
|
|||
}
|
||||
if( c == L'\'' )
|
||||
{
|
||||
if( unescape_special )
|
||||
in[out_pos] = INTERNAL_SEPARATOR;
|
||||
mode = 0;
|
||||
}
|
||||
|
@ -1215,6 +1219,7 @@ wchar_t *unescape( const wchar_t * orig, int unescape_special )
|
|||
case '"':
|
||||
{
|
||||
mode = 0;
|
||||
if( unescape_special )
|
||||
in[out_pos] = INTERNAL_SEPARATOR;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue