summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.1141
blob: da4ced9492074c2257e9cf4efabe7b93a46b5aed (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
To: vim_dev@googlegroups.com
Subject: Patch 8.1.1141
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.1141
Problem:    Terminal winpos test fails with very large terminal. (Dominique
            Pelle)
Solution:   Compute the expected size more accurately. (closes #4228)
Files:	    src/testdir/test_terminal.vim


*** ../vim-8.1.1140/src/testdir/test_terminal.vim	2019-04-06 22:21:19.226680116 +0200
--- src/testdir/test_terminal.vim	2019-04-09 21:15:58.026189032 +0200
***************
*** 1912,1920 ****
    let ypos = str2nr(substitute(line, '\[\d\+, \(\d\+\)\]', '\1', ''))
  
    " Position must be bigger than the getwinpos() result of Vim itself.
    let [xroot, yroot] = getwinpos()
!   call assert_inrange(xroot + 2, xroot + 1000, xpos)
!   call assert_inrange(yroot + 2, yroot + 1000, ypos)
  
    call term_wait(buf)
    call term_sendkeys(buf, ":q\<CR>")
--- 1912,1926 ----
    let ypos = str2nr(substitute(line, '\[\d\+, \(\d\+\)\]', '\1', ''))
  
    " Position must be bigger than the getwinpos() result of Vim itself.
+   " The calcuation in the console assumes a 10 x 7 character cell.
+   " In the GUI it can be more, let's assume a 20 x 14 cell.
+   " And then add 100 / 200 tolerance.
    let [xroot, yroot] = getwinpos()
!   let [winrow, wincol] = win_screenpos('.')
!   let xoff = wincol * (has('gui_running') ? 14 : 7) + 100
!   let yoff = winrow * (has('gui_running') ? 20 : 10) + 200
!   call assert_inrange(xroot + 2, xroot + xoff, xpos)
!   call assert_inrange(yroot + 2, yroot + yoff, ypos)
  
    call term_wait(buf)
    call term_sendkeys(buf, ":q\<CR>")
*** ../vim-8.1.1140/src/version.c	2019-04-08 20:01:42.877179442 +0200
--- src/version.c	2019-04-09 21:16:54.013862851 +0200
***************
*** 773,774 ****
--- 773,776 ----
  {   /* Add new patch number below this line */
+ /**/
+     1141,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
236. You start saving URL's in your digital watch.

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