comparison src/gui_w32.c @ 12090:c4caf49c8bf4 v8.0.0925

patch 8.0.0925: MS-Windows GUI: channel I/O not handled right away commit https://github.com/vim/vim/commit/62426e168ef29fb941d1bd91a112fa09445322a5 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Aug 13 15:37:58 2017 +0200 patch 8.0.0925: MS-Windows GUI: channel I/O not handled right away Problem: MS-Windows GUI: channel I/O not handled right away. Solution: Don't call process_message() unless a message is available. (Yasuhiro Matsumoto, closes #1969)
author Christian Brabandt <cb@256bit.org>
date Sun, 13 Aug 2017 15:45:04 +0200
parents 8ad282dee649
children 2a8890b80923
comparison
equal deleted inserted replaced
12089:d61607f10e9f 12090:c4caf49c8bf4
2071 2071
2072 #ifdef FEAT_TIMERS 2072 #ifdef FEAT_TIMERS
2073 did_add_timer = FALSE; 2073 did_add_timer = FALSE;
2074 #endif 2074 #endif
2075 #ifdef MESSAGE_QUEUE 2075 #ifdef MESSAGE_QUEUE
2076 /* Check channel while waiting message. */ 2076 /* Check channel I/O while waiting for a message. */
2077 for (;;) 2077 for (;;)
2078 { 2078 {
2079 MSG msg; 2079 MSG msg;
2080 2080
2081 parse_queued_messages(); 2081 parse_queued_messages();
2082 2082
2083 if (pPeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE) 2083 if (pPeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE))
2084 || MsgWaitForMultipleObjects(0, NULL, FALSE, 100, QS_ALLINPUT) 2084 {
2085 != WAIT_TIMEOUT) 2085 process_message();
2086 break; 2086 break;
2087 } 2087 }
2088 #endif 2088 else if (MsgWaitForMultipleObjects(0, NULL, FALSE, 100, QS_ALLINPUT)
2089 2089 != WAIT_TIMEOUT)
2090 break;
2091 }
2092 #else
2090 /* 2093 /*
2091 * Don't use gui_mch_update() because then we will spin-lock until a 2094 * Don't use gui_mch_update() because then we will spin-lock until a
2092 * char arrives, instead we use GetMessage() to hang until an 2095 * char arrives, instead we use GetMessage() to hang until an
2093 * event arrives. No need to check for input_buf_full because we are 2096 * event arrives. No need to check for input_buf_full because we are
2094 * returning as soon as it contains a single char -- webb 2097 * returning as soon as it contains a single char -- webb
2095 */ 2098 */
2096 process_message(); 2099 process_message();
2100 #endif
2097 2101
2098 if (input_available()) 2102 if (input_available())
2099 { 2103 {
2100 remove_any_timer(); 2104 remove_any_timer();
2101 allow_scrollbar = FALSE; 2105 allow_scrollbar = FALSE;