mirror of
https://github.com/vim/vim.git
synced 2025-09-28 04:24:06 -04:00
patch 8.1.0929: no error when requesting ConPTY but it's not available
Problem: No error when requesting ConPTY but it's not available. Solution: Add an error message. (Hirohito Higashi, closes #3967)
This commit is contained in:
@@ -413,13 +413,13 @@ Just put the files somewhere in your PATH. You can set the 'winptydll' option
|
|||||||
to point to the right file, if needed. If you have both the 32-bit and 64-bit
|
to point to the right file, if needed. If you have both the 32-bit and 64-bit
|
||||||
version, rename to winpty32.dll and winpty64.dll to match the way Vim was
|
version, rename to winpty32.dll and winpty64.dll to match the way Vim was
|
||||||
build.
|
build.
|
||||||
*ConPTY*
|
*ConPTY* *E982*
|
||||||
On more recent versions of MS-Windows 10 (beginning with the "October 2018
|
On more recent versions of MS-Windows 10 (beginning with the "October 2018
|
||||||
Update"), winpty is no longer required. On those versions, |:terminal| will use
|
Update"), winpty is no longer required. On those versions, |:terminal| will use
|
||||||
Windows' built-in support for hosting terminal applications, "ConPTY". When
|
Windows' built-in support for hosting terminal applications, "ConPTY". When
|
||||||
ConPTY is in use, there may be rendering artifacts regarding ambiguous-width
|
ConPTY is in use, there may be rendering artifacts regarding ambiguous-width
|
||||||
characters. If you encounter any such issues, set 'termwintype' to "winpty"
|
characters. If you encounter any such issues, install "winpty". Until the
|
||||||
(which you then must have instlled).
|
ConPTY problems have been fixed "winpty" will be preferred.
|
||||||
|
|
||||||
Environment variables are used to pass information to the running job:
|
Environment variables are used to pass information to the running job:
|
||||||
VIM_SERVERNAME v:servername
|
VIM_SERVERNAME v:servername
|
||||||
|
@@ -5620,10 +5620,8 @@ void (WINAPI *pDeleteProcThreadAttributeList)(LPPROC_THREAD_ATTRIBUTE_LIST);
|
|||||||
static int
|
static int
|
||||||
dyn_conpty_init(int verbose)
|
dyn_conpty_init(int verbose)
|
||||||
{
|
{
|
||||||
static BOOL handled = FALSE;
|
static HMODULE hKerneldll = NULL;
|
||||||
static int result;
|
int i;
|
||||||
HMODULE hKerneldll;
|
|
||||||
int i;
|
|
||||||
static struct
|
static struct
|
||||||
{
|
{
|
||||||
char *name;
|
char *name;
|
||||||
@@ -5642,16 +5640,17 @@ dyn_conpty_init(int verbose)
|
|||||||
{NULL, NULL}
|
{NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
if (handled)
|
|
||||||
return result;
|
|
||||||
|
|
||||||
if (!has_conpty_working())
|
if (!has_conpty_working())
|
||||||
{
|
{
|
||||||
handled = TRUE;
|
if (verbose)
|
||||||
result = FAIL;
|
emsg(_("E982: ConPTY is not available"));
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// No need to initialize twice.
|
||||||
|
if (hKerneldll)
|
||||||
|
return OK;
|
||||||
|
|
||||||
hKerneldll = vimLoadLib("kernel32.dll");
|
hKerneldll = vimLoadLib("kernel32.dll");
|
||||||
for (i = 0; conpty_entry[i].name != NULL
|
for (i = 0; conpty_entry[i].name != NULL
|
||||||
&& conpty_entry[i].ptr != NULL; ++i)
|
&& conpty_entry[i].ptr != NULL; ++i)
|
||||||
@@ -5661,12 +5660,11 @@ dyn_conpty_init(int verbose)
|
|||||||
{
|
{
|
||||||
if (verbose)
|
if (verbose)
|
||||||
semsg(_(e_loadfunc), conpty_entry[i].name);
|
semsg(_(e_loadfunc), conpty_entry[i].name);
|
||||||
|
hKerneldll = NULL;
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
handled = TRUE;
|
|
||||||
result = OK;
|
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6015,6 +6013,7 @@ dyn_winpty_init(int verbose)
|
|||||||
{
|
{
|
||||||
if (verbose)
|
if (verbose)
|
||||||
semsg(_(e_loadfunc), winpty_entry[i].name);
|
semsg(_(e_loadfunc), winpty_entry[i].name);
|
||||||
|
hWinPtyDLL = NULL;
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -783,6 +783,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
929,
|
||||||
/**/
|
/**/
|
||||||
928,
|
928,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user