1
0
forked from aniani/vim

patch 8.0.0949: winpty.dll name is fixed

Problem:    winpty.dll name is fixed.
Solution:   Add the 'winptydll' option. Make the default name depend on
            whether it is a 32-bit or 64-bit build. (idea by Yasuhiro
            Matsumoto, closes #1978)
This commit is contained in:
Bram Moolenaar
2017-08-16 23:14:08 +02:00
parent 989a70c590
commit 9e13aa7729
5 changed files with 41 additions and 3 deletions

View File

@@ -38,6 +38,7 @@
* in tl_scrollback are no longer used.
*
* TODO:
* - make [range]terminal pipe [range] lines to the terminal
* - implement term_setsize()
* - add test for giving error for invalid 'termsize' value.
* - support minimal size when 'termsize' is "rows*cols".
@@ -2768,11 +2769,15 @@ dyn_winpty_init(void)
/* No need to initialize twice. */
if (hWinPtyDLL)
return 1;
/* Load winpty.dll */
hWinPtyDLL = vimLoadLib(WINPTY_DLL);
/* Load winpty.dll, prefer using the 'winptydll' option, fall back to just
* winpty.dll. */
if (*p_winptydll != NUL)
hWinPtyDLL = vimLoadLib((char *)p_winptydll);
if (!hWinPtyDLL)
hWinPtyDLL = vimLoadLib(WINPTY_DLL);
if (!hWinPtyDLL)
{
EMSG2(_(e_loadlib), WINPTY_DLL);
EMSG2(_(e_loadlib), *p_winptydll != NUL ? p_winptydll : WINPTY_DLL);
return 0;
}
for (i = 0; winpty_entry[i].name != NULL