Revert "input.cpp: remove unused describe_char()"

This reverts commit 99cfca8498.

describe_char is quite useful for debugging.
This commit is contained in:
ridiculousfish 2022-04-09 13:48:03 -07:00
parent 32ed0b80da
commit 031b26584b

View file

@ -173,6 +173,13 @@ static_assert(sizeof(input_function_metadata) / sizeof(input_function_metadata[0
"input_function_metadata size mismatch with input_common. Did you forget to update "
"input_function_metadata?");
wcstring describe_char(wint_t c) {
if (c < R_END_INPUT_FUNCTIONS) {
return format_string(L"%02x (%ls)", c, input_function_metadata[c].name);
}
return format_string(L"%02x", c);
}
using mapping_list_t = std::vector<input_mapping_t>;
input_mapping_set_t::input_mapping_set_t() = default;
input_mapping_set_t::~input_mapping_set_t() = default;
@ -690,7 +697,7 @@ void inputter_t::mapping_execute_matching_or_generic(const command_handler_t &co
}
FLOGF(reader, L"no generic found, ignoring char...");
peeker.next();
auto evt = peeker.next();
peeker.consume();
}