From f44f9f1e892e901e4dd91c4e9b7f7ee3a381bd35 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Wed, 12 Feb 2020 14:46:33 +0100 Subject: [PATCH] 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 --- src/flog.h | 1 + src/output.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/flog.h b/src/flog.h index f726284c6..f85f1b647 100644 --- a/src/flog.h +++ b/src/flog.h @@ -61,6 +61,7 @@ class category_list_t { 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_chatty{L"parse-productions-chatty", L"Resolving tokens (chatty messages)"}; diff --git a/src/output.cpp b/src/output.cpp index b646b3076..f641bcb12 100644 --- a/src/output.cpp +++ b/src/output.cpp @@ -404,7 +404,7 @@ void outputter_t::writestr(const wchar_t *str) { size_t len = wcstombs(nullptr, str, 0); // figure amount of space needed if (len == static_cast(-1)) { - FLOGF(warning, L"Tried to print invalid wide character string"); + FLOGF(output_invalid, L"Tried to print invalid wide character string"); return; }