summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.1132
blob: ed8099ced6c09c07120aec624c74b83cfd58654c (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
To: vim_dev@googlegroups.com
Subject: Patch 8.1.1132
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.1132
Problem:    getwinpos() test fails on MS-Windows.
Solution:   Don't try running this test.
Files:	    src/testdir/test_terminal.vim


*** ../vim-8.1.1131/src/testdir/test_terminal.vim	2019-04-06 22:01:20.756989404 +0200
--- src/testdir/test_terminal.vim	2019-04-06 22:19:26.599281275 +0200
***************
*** 1889,1894 ****
--- 1889,1898 ----
  endfunc
  
  func Test_terminal_getwinpos()
+   if !CanRunVimInTerminal()
+     return
+   endif
+ 
    " split, go to the bottom-right window
    split
    wincmd j
***************
*** 1907,1923 ****
    let xpos = str2nr(substitute(line, '\[\(\d\+\), \d\+\]', '\1', ''))
    let ypos = str2nr(substitute(line, '\[\d\+, \(\d\+\)\]', '\1', ''))
  
!   " getwinpos() in the MS-Windows console returns the screen position of the
!   " emulated console.
!   if has('win32')
!     call assert_inrange(0, 4000, xpos)
!     call assert_inrange(0, 2000, ypos)
!   else
!     " 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)
!   endif
  
    call term_wait(buf)
    call term_sendkeys(buf, ":q\<CR>")
--- 1911,1920 ----
    let xpos = str2nr(substitute(line, '\[\(\d\+\), \d\+\]', '\1', ''))
    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>")
*** ../vim-8.1.1131/src/version.c	2019-04-06 22:01:20.756989404 +0200
--- src/version.c	2019-04-06 22:20:16.555014827 +0200
***************
*** 773,774 ****
--- 773,776 ----
  {   /* Add new patch number below this line */
+ /**/
+     1132,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
218. Your spouse hands you a gift wrapped magnet with your PC's name
     on it and you accuse him or her of genocide.

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