aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorSimon Rozman <simon@rozman.si>2019-09-05 08:30:54 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-09-05 22:03:21 -0600
commitb66c2b61f4504d5a17d6000106c6b2704ce15d45 (patch)
treee8479267fc21416ff9ab8d20a9ed44b1c68337e3 /ui
parentui: syntax: xor colors with background (diff)
downloadwireguard-windows-b66c2b61f4504d5a17d6000106c6b2704ce15d45.tar.xz
wireguard-windows-b66c2b61f4504d5a17d6000106c6b2704ce15d45.zip
ui: syntax: support Shift+Ins pasting too
Signed-off-by: Simon Rozman <simon@rozman.si>
Diffstat (limited to 'ui')
-rw-r--r--ui/syntax/syntaxedit.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ui/syntax/syntaxedit.c b/ui/syntax/syntaxedit.c
index 921cc7b6..c04c1f8a 100644
--- a/ui/syntax/syntaxedit.c
+++ b/ui/syntax/syntaxedit.c
@@ -346,15 +346,15 @@ static LRESULT CALLBACK child_proc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lP
case WM_PASTE:
SendMessage(hWnd, EM_PASTESPECIAL, CF_TEXT, 0);
return 0;
- case WM_KEYDOWN:
- if (!(GetKeyState(VK_CONTROL) & 0x8000))
- break;
- switch (LOWORD(wParam)) {
- case 'V':
+ case WM_KEYDOWN: {
+ WORD key = LOWORD(wParam);
+ if ((key == 'V' && GetKeyState(VK_CONTROL) < 0) ||
+ (key == VK_INSERT && GetKeyState(VK_SHIFT) < 0)) {
SendMessage(hWnd, EM_PASTESPECIAL, CF_TEXT, 0);
return 0;
}
break;
+ }
case WM_CONTEXTMENU:
context_menu(hWnd, LOWORD(lParam), HIWORD(lParam));
return 0;