diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2013-04-07 23:54:43 -0700 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2013-04-07 23:54:43 -0700 |
commit | b8f34cdd35cfddb4573e6b1ccc8f063b840b6b54 (patch) | |
tree | 1114918a109579ad61cf437272080c5da1c5978b /common.cpp | |
parent | 993c02857948b45e5d17cc2696f347c73b3a450d (diff) |
Teach case-insensitive completions about tildes. Fixes https://github.com/fish-shell/fish-shell/issues/647
Diffstat (limited to 'common.cpp')
-rw-r--r-- | common.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -554,12 +554,8 @@ wchar_t *quote_end(const wchar_t *pos) wcstring wsetlocale(int category, const wchar_t *locale) { - char *lang = NULL; - if (locale) - { - lang = wcs2str(locale); - } - char * res = setlocale(category,lang); + char *lang = locale ? wcs2str(locale) : NULL; + char *res = setlocale(category, lang); free(lang); /* @@ -572,7 +568,7 @@ wcstring wsetlocale(int category, const wchar_t *locale) // U+23CE is the "return" character omitted_newline_char = unicode ? L'\x23CE' : L'~'; - + if (!res) return wcstring(); else |