Mercurial > vim
diff src/os_win32.c @ 20007:aadd1cae2ff5 v8.2.0559
patch 8.2.0559: clearing a struct is verbose
Commit: https://github.com/vim/vim/commit/a80faa8930ed5a554beeb2727762538873135e83
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Apr 12 19:37:17 2020 +0200
patch 8.2.0559: clearing a struct is verbose
Problem: Clearing a struct is verbose.
Solution: Define and use CLEAR_FIELD() and CLEAR_POINTER().
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 12 Apr 2020 19:45:05 +0200 |
parents | 8f2bc094acee |
children | 678cdef2d690 |
line wrap: on
line diff
--- a/src/os_win32.c +++ b/src/os_win32.c @@ -950,7 +950,7 @@ win32_kbd_patch_key( if (pker->UChar != 0) return 1; - vim_memset(abKeystate, 0, sizeof (abKeystate)); + CLEAR_FIELD(abKeystate); // Clear any pending dead keys ToUnicode(VK_SPACE, MapVirtualKey(VK_SPACE, 0), abKeystate, awAnsiCode, 2, 0);