mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-27 07:44:24 +02:00
Prevent typing control characters into document
Fix #13279, close #14766
This commit is contained in:
parent
6c027d343f
commit
40adc38201
@ -497,6 +497,17 @@ LRESULT ScintillaEditView::scintillaNew_Proc(HWND hwnd, UINT Message, WPARAM wPa
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case WM_CHAR:
|
||||||
|
{
|
||||||
|
// prevent "control characters" from being entered in text
|
||||||
|
// (don't need to be concerned about Tab or CR or LF etc here)
|
||||||
|
if ((wParam >= 0 && wParam <= 31) || wParam == 127)
|
||||||
|
{
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case WM_KEYUP:
|
case WM_KEYUP:
|
||||||
{
|
{
|
||||||
if (wParam == VK_PRIOR || wParam == VK_NEXT)
|
if (wParam == VK_PRIOR || wParam == VK_NEXT)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user