diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-10-31 12:08:28 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-10-31 12:08:28 +0100 |
commit | b6297dae8c69f707f8f9266810d192a95b384eeb (patch) | |
tree | 92fc683f6224d70830ce6f1f77aa494353c7d0a1 | |
parent | mod: bump (diff) | |
download | wireguard-windows-b6297dae8c69f707f8f9266810d192a95b384eeb.tar.xz wireguard-windows-b6297dae8c69f707f8f9266810d192a95b384eeb.zip |
syntax: disable events when highlighting
-rw-r--r-- | ui/syntax/syntaxedit.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ui/syntax/syntaxedit.c b/ui/syntax/syntaxedit.c index 2e53b011..80cff689 100644 --- a/ui/syntax/syntaxedit.c +++ b/ui/syntax/syntaxedit.c @@ -172,6 +172,7 @@ static void highlight_text(HWND hWnd) evaluate_untunneled_blocking(this, hWnd, msg, spans); this->idoc->lpVtbl->Undo(this->idoc, tomSuspend, NULL); + SendMessage(hWnd, EM_SETEVENTMASK, 0, 0); SendMessage(hWnd, WM_SETREDRAW, FALSE, 0); SendMessage(hWnd, EM_EXGETSEL, 0, (LPARAM)&orig_selection); SendMessage(hWnd, EM_GETSCROLLPOS, 0, (LPARAM)&original_scroll); @@ -198,6 +199,7 @@ static void highlight_text(HWND hWnd) SendMessage(hWnd, EM_HIDESELECTION, FALSE, 0); SendMessage(hWnd, WM_SETREDRAW, TRUE, 0); RedrawWindow(hWnd, NULL, NULL, RDW_ERASE | RDW_FRAME | RDW_INVALIDATE | RDW_ALLCHILDREN); + SendMessage(hWnd, EM_SETEVENTMASK, 0, ENM_CHANGE); this->idoc->lpVtbl->Undo(this->idoc, tomResume, NULL); if (!found_private_key) SendMessage(hWnd, SE_PRIVATE_KEY, 0, 0); |