mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-04-23 02:41:14 -03:00
Drop "invalid wide character string" warning down to a debug
This is *super annoying* if you have a non-ascii char in your prompt and accidentally have a C locale. Renders fish borderline unusable. Fixes #6584
This commit is contained in:
@@ -61,6 +61,7 @@ class category_list_t {
|
|||||||
|
|
||||||
category_t exec_fork{L"exec-fork", L"Calls to fork()"};
|
category_t exec_fork{L"exec-fork", L"Calls to fork()"};
|
||||||
|
|
||||||
|
category_t output_invalid{L"output-invalid", L"Trying to print invalid output"};
|
||||||
category_t parse_productions{L"parse-productions", L"Resolving tokens"};
|
category_t parse_productions{L"parse-productions", L"Resolving tokens"};
|
||||||
category_t parse_productions_chatty{L"parse-productions-chatty",
|
category_t parse_productions_chatty{L"parse-productions-chatty",
|
||||||
L"Resolving tokens (chatty messages)"};
|
L"Resolving tokens (chatty messages)"};
|
||||||
|
|||||||
@@ -404,7 +404,7 @@ void outputter_t::writestr(const wchar_t *str) {
|
|||||||
|
|
||||||
size_t len = wcstombs(nullptr, str, 0); // figure amount of space needed
|
size_t len = wcstombs(nullptr, str, 0); // figure amount of space needed
|
||||||
if (len == static_cast<size_t>(-1)) {
|
if (len == static_cast<size_t>(-1)) {
|
||||||
FLOGF(warning, L"Tried to print invalid wide character string");
|
FLOGF(output_invalid, L"Tried to print invalid wide character string");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user