1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Real control fix (#5787)

* Allow enabling and disabling mods.

* Re-fix 605599b6f1

This breaks some chars like € in chat.

Instead verify is char is a non control char -> iswcntrl
This commit is contained in:
Loïc Blot 2017-05-20 22:29:15 +02:00 committed by GitHub
parent 358074b296
commit 90808a4f34
4 changed files with 62 additions and 68 deletions

View file

@ -627,7 +627,7 @@ bool GUIChatConsole::OnEvent(const SEvent& event)
bool backwards = event.KeyInput.Shift;
prompt.nickCompletion(names, backwards);
return true;
} else if (iswprint(event.KeyInput.Char) && !event.KeyInput.Control) {
} else if (!iswcntrl(event.KeyInput.Char) && !event.KeyInput.Control) {
#if defined(__linux__) && (IRRLICHT_VERSION_MAJOR == 1 && IRRLICHT_VERSION_MINOR < 9)
wchar_t wc = L'_';
mbtowc( &wc, (char *) &event.KeyInput.Char, sizeof(event.KeyInput.Char) );