mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 7.4.1355
Problem: Win32 console and GUI handle channels differently. Solution: Consolidate code between Win32 console and GUI.
This commit is contained in:
@@ -1128,30 +1128,6 @@ mch_setmouse(int on)
|
||||
SetConsoleMode(g_hConIn, cmodein);
|
||||
}
|
||||
|
||||
#ifdef FEAT_CHANNEL
|
||||
static int
|
||||
handle_channel_event(void)
|
||||
{
|
||||
int ret;
|
||||
fd_set rfds;
|
||||
int maxfd;
|
||||
|
||||
FD_ZERO(&rfds);
|
||||
maxfd = channel_select_setup(-1, &rfds);
|
||||
if (maxfd >= 0)
|
||||
{
|
||||
struct timeval tv;
|
||||
|
||||
tv.tv_sec = 0;
|
||||
tv.tv_usec = 0;
|
||||
ret = select(maxfd + 1, &rfds, NULL, NULL, &tv);
|
||||
if (ret > 0 && channel_select_check(ret, &rfds) > 0)
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Decode a MOUSE_EVENT. If it's a valid event, return MOUSE_LEFT,
|
||||
* MOUSE_MIDDLE, or MOUSE_RIGHT for a click; MOUSE_DRAG for a mouse
|
||||
@@ -1495,8 +1471,7 @@ WaitForChar(long msec)
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_CHANNEL
|
||||
if (handle_channel_event())
|
||||
return TRUE;
|
||||
channel_handle_events();
|
||||
#endif
|
||||
|
||||
if (0
|
||||
|
Reference in New Issue
Block a user