summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0784
blob: 0b5199e400f24cb2dec8ab4c8fdf67b8efbc3dce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0784
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 8.1.0784
Problem:    Messy indent in if statement.
Solution:   Improve structure of if statement. (Ozaki Kiichi, closes #3826)
Files:	    src/os_win32.c


*** ../vim-8.1.0783/src/os_win32.c	2019-01-19 17:43:03.425449092 +0100
--- src/os_win32.c	2019-01-19 21:09:31.750936487 +0100
***************
*** 1576,1609 ****
  		dwWaitTime = p_mzq; /* don't wait longer than 'mzquantum' */
  #endif
  #ifdef FEAT_TIMERS
  	    {
  		long	due_time;
  
! 		/* When waiting very briefly don't trigger timers. */
! 		if (dwWaitTime > 10)
  		{
! 		    /* Trigger timers and then get the time in msec until the
! 		     * next one is due.  Wait up to that time. */
! 		    due_time = check_due_timer();
! 		    if (typebuf.tb_change_cnt != tb_change_cnt)
! 		    {
! 			/* timer may have used feedkeys() */
! 			return FALSE;
! 		    }
! 		    if (due_time > 0 && dwWaitTime > (DWORD)due_time)
! 			dwWaitTime = due_time;
  		}
  	    }
  #endif
  #ifdef FEAT_CLIENTSERVER
! 	    /* Wait for either an event on the console input or a message in
! 	     * the client-server window. */
! 	    if (msg_wait_for_multiple_objects(1, &g_hConIn, FALSE,
! 				 dwWaitTime, QS_SENDMESSAGE) != WAIT_OBJECT_0)
  #else
! 	    if (wait_for_single_object(g_hConIn, dwWaitTime) != WAIT_OBJECT_0)
  #endif
! 		    continue;
  	}
  
  	cRecords = 0;
--- 1576,1610 ----
  		dwWaitTime = p_mzq; /* don't wait longer than 'mzquantum' */
  #endif
  #ifdef FEAT_TIMERS
+ 	    // When waiting very briefly don't trigger timers.
+ 	    if (dwWaitTime > 10)
  	    {
  		long	due_time;
  
! 		// Trigger timers and then get the time in msec until the next
! 		// one is due.  Wait up to that time.
! 		due_time = check_due_timer();
! 		if (typebuf.tb_change_cnt != tb_change_cnt)
  		{
! 		    // timer may have used feedkeys().
! 		    return FALSE;
  		}
+ 		if (due_time > 0 && dwWaitTime > (DWORD)due_time)
+ 		    dwWaitTime = due_time;
  	    }
  #endif
+ 	    if (
  #ifdef FEAT_CLIENTSERVER
! 		    // Wait for either an event on the console input or a
! 		    // message in the client-server window.
! 		    msg_wait_for_multiple_objects(1, &g_hConIn, FALSE,
! 				  dwWaitTime, QS_SENDMESSAGE) != WAIT_OBJECT_0
  #else
! 		    wait_for_single_object(g_hConIn, dwWaitTime)
! 							      != WAIT_OBJECT_0
  #endif
! 		    )
! 		continue;
  	}
  
  	cRecords = 0;
*** ../vim-8.1.0783/src/version.c	2019-01-19 21:06:55.348138753 +0100
--- src/version.c	2019-01-19 21:12:16.405673931 +0100
***************
*** 793,794 ****
--- 793,796 ----
  {   /* Add new patch number below this line */
+ /**/
+     784,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
265. Your reason for not staying in touch with family is that
     they do not have e-mail addresses.

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///