aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ui
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-10-31 12:08:28 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2019-12-11 12:06:25 +0100
commit44c147466f7554135908ce7e033b4b4e693a67d2 (patch)
tree95490ad0bc460fd329657794d6e5c59c3f6c13ec /ui
parenttunnel: stop burst timer if we exceed 2 seconds (diff)
downloadwireguard-windows-44c147466f7554135908ce7e033b4b4e693a67d2.tar.xz
wireguard-windows-44c147466f7554135908ce7e033b4b4e693a67d2.zip
syntax: disable events when highlighting
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'ui')
-rw-r--r--ui/syntax/syntaxedit.c2
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);