summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0844
blob: 202b79969de4925e9c554cc9c38c985233f4f73f (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
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0844
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.0844
Problem:    When timer fails test will hang forever.
Solution:   Use reltime() to limit waiting time. (Ozaki Kiichi, closes #3878)
Files:	    src/testdir/test_timers.vim


*** ../vim-8.1.0843/src/testdir/test_timers.vim	2019-01-28 23:20:00.407634900 +0100
--- src/testdir/test_timers.vim	2019-01-29 20:34:41.123382637 +0100
***************
*** 257,265 ****
      return
    endif
  
    let id = timer_start(20, {id -> feedkeys('x', 'L')})
    let c = 0
!   while c == 0
      let c = getchar(0)
      sleep 10m
    endwhile
--- 257,267 ----
      return
    endif
  
+   " Measure the elapsed time to avoid a hang when it fails.
+   let start = reltime()
    let id = timer_start(20, {id -> feedkeys('x', 'L')})
    let c = 0
!   while c == 0 && reltimefloat(reltime(start)) < 0.2
      let c = getchar(0)
      sleep 10m
    endwhile
*** ../vim-8.1.0843/src/version.c	2019-01-29 20:17:25.554548212 +0100
--- src/version.c	2019-01-29 20:36:10.118765845 +0100
***************
*** 785,786 ****
--- 785,788 ----
  {   /* Add new patch number below this line */
+ /**/
+     844,
  /**/

-- 
ARTHUR:  You fight with the strength of many men, Sir knight.
         I am Arthur, King of the Britons.  [pause]
         I seek the finest and the bravest knights in the land to join me
         in my Court of Camelot.  [pause]
         You have proved yourself worthy; will you join me?  [pause]
         You make me sad.  So be it.  Come, Patsy.
BLACK KNIGHT:  None shall pass.
                                  The Quest for the Holy Grail (Monty Python)

 /// 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    ///