diff options
author | Sam Bingner <sam@bingner.com> | 2018-12-13 15:11:52 -1000 |
---|---|---|
committer | Sam Bingner <sam@bingner.com> | 2018-12-13 15:11:52 -1000 |
commit | 957aa75d05c00731d7112bed7b68ce4568667d0c (patch) | |
tree | 0445216818495a7864eaa3acde1a1570d34b958d /data/vim/patches/8.1.0462 | |
parent | c54a909c8b5a8519130803cf55f68603c0ad3682 (diff) |
Update vim
Diffstat (limited to 'data/vim/patches/8.1.0462')
-rw-r--r-- | data/vim/patches/8.1.0462 | 115 |
1 files changed, 115 insertions, 0 deletions
diff --git a/data/vim/patches/8.1.0462 b/data/vim/patches/8.1.0462 new file mode 100644 index 000000000..dbf8176c3 --- /dev/null +++ b/data/vim/patches/8.1.0462 @@ -0,0 +1,115 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0462 +Fcc: outbox +From: Bram Moolenaar <Bram@moolenaar.net> +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0462 +Problem: When using ConPTY Vim can be a child process. +Solution: To find a Vim window use both EnumWindows() and + EnumChildWindows(). (Nobuhiro Takasaki, closes #3521) +Files: src/os_mswin.c + + +*** ../vim-8.1.0461/src/os_mswin.c 2018-08-07 22:30:26.674240818 +0200 +--- src/os_mswin.c 2018-10-07 20:32:20.655313848 +0200 +*************** +*** 2324,2329 **** +--- 2324,2364 ---- + return TRUE; + } + ++ struct enum_windows_s ++ { ++ WNDENUMPROC lpEnumFunc; ++ LPARAM lParam; ++ }; ++ ++ static BOOL CALLBACK ++ enum_windows_child(HWND hwnd, LPARAM lParam) ++ { ++ struct enum_windows_s *ew = (struct enum_windows_s *)lParam; ++ ++ return (ew->lpEnumFunc)(hwnd, ew->lParam); ++ } ++ ++ static BOOL CALLBACK ++ enum_windows_toplevel(HWND hwnd, LPARAM lParam) ++ { ++ struct enum_windows_s *ew = (struct enum_windows_s *)lParam; ++ ++ if ((ew->lpEnumFunc)(hwnd, ew->lParam) == FALSE) ++ return FALSE; ++ return EnumChildWindows(hwnd, enum_windows_child, lParam); ++ } ++ ++ /* Enumerate all windows including children. */ ++ static BOOL ++ enum_windows(WNDENUMPROC lpEnumFunc, LPARAM lParam) ++ { ++ struct enum_windows_s ew; ++ ++ ew.lpEnumFunc = lpEnumFunc; ++ ew.lParam = lParam; ++ return EnumWindows(enum_windows_toplevel, (LPARAM)&ew); ++ } ++ + static HWND + findServer(char_u *name) + { +*************** +*** 2332,2338 **** + id.name = name; + id.hwnd = 0; + +! EnumWindows(enumWindowsGetServer, (LPARAM)(&id)); + + return id.hwnd; + } +--- 2367,2373 ---- + id.name = name; + id.hwnd = 0; + +! enum_windows(enumWindowsGetServer, (LPARAM)(&id)); + + return id.hwnd; + } +*************** +*** 2395,2401 **** + + ga_init2(&ga, 1, 100); + +! EnumWindows(enumWindowsGetNames, (LPARAM)(&ga)); + ga_append(&ga, NUL); + + return ga.ga_data; +--- 2430,2436 ---- + + ga_init2(&ga, 1, 100); + +! enum_windows(enumWindowsGetNames, (LPARAM)(&ga)); + ga_append(&ga, NUL); + + return ga.ga_data; +*** ../vim-8.1.0461/src/version.c 2018-10-07 20:26:15.834185143 +0200 +--- src/version.c 2018-10-07 20:34:15.754398574 +0200 +*************** +*** 794,795 **** +--- 794,797 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 462, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +170. You introduce your wife as "my_lady@home.wife" and refer to your + children as "forked processes." + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |