0
0
mirror of https://github.com/vim/vim.git synced 2025-09-28 04:24:06 -04:00

patch 7.4.1195

Problem:    The channel feature does not work in the MS-Windows console.
Solution:   Add win32 console support. (Yasuhiro Matsumoto)
This commit is contained in:
Bram Moolenaar
2016-01-29 21:11:25 +01:00
parent 83162468b3
commit f12d983dea
8 changed files with 53 additions and 30 deletions

View File

@@ -553,9 +553,6 @@ typedef BOOL (WINAPI *TGetMonitorInfo)(_HMONITOR, _MONITORINFO *);
static TMonitorFromWindow pMonitorFromWindow = NULL;
static TGetMonitorInfo pGetMonitorInfo = NULL;
static HANDLE user32_lib = NULL;
#ifdef FEAT_CHANNEL
int WSInitialized = FALSE; /* WinSock is initialized */
#endif
/*
* Return TRUE when running under Windows NT 3.x or Win32s, both of which have
* less fancy GUI APIs.
@@ -844,6 +841,7 @@ _OnWindowPosChanged(
const LPWINDOWPOS lpwpos)
{
static int x = 0, y = 0, cx = 0, cy = 0;
extern int WSInitialized;
if (WSInitialized && (lpwpos->x != x || lpwpos->y != y
|| lpwpos->cx != cx || lpwpos->cy != cy))
@@ -5049,22 +5047,3 @@ netbeans_draw_multisign_indicator(int row)
SetPixel(s_hdc, x+2, y, gui.currFgColor);
}
#endif
#if defined(FEAT_CHANNEL) || defined(PROTO)
/*
* Initialize the Winsock dll.
*/
void
channel_init_winsock()
{
WSADATA wsaData;
int wsaerr;
if (WSInitialized)
return;
wsaerr = WSAStartup(MAKEWORD(2, 2), &wsaData);
if (wsaerr == 0)
WSInitialized = TRUE;
}
#endif