Skip to content

Commit 616aeef

Browse files
committed
patch 8.1.1132: getwinpos() test fails on MS-Windows
Problem: getwinpos() test fails on MS-Windows. Solution: Don't try running this test.
1 parent 16c34c3 commit 616aeef

2 files changed

Lines changed: 10 additions & 11 deletions

File tree

src/testdir/test_terminal.vim

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1889,6 +1889,10 @@ func Test_terminal_statusline()
18891889
endfunc
18901890

18911891
func Test_terminal_getwinpos()
1892+
if !CanRunVimInTerminal()
1893+
return
1894+
endif
1895+
18921896
" split, go to the bottom-right window
18931897
split
18941898
wincmd j
@@ -1907,17 +1911,10 @@ func Test_terminal_getwinpos()
19071911
let xpos = str2nr(substitute(line, '\[\(\d\+\), \d\+\]', '\1', ''))
19081912
let ypos = str2nr(substitute(line, '\[\d\+, \(\d\+\)\]', '\1', ''))
19091913

1910-
" getwinpos() in the MS-Windows console returns the screen position of the
1911-
" emulated console.
1912-
if has('win32')
1913-
call assert_inrange(0, 4000, xpos)
1914-
call assert_inrange(0, 2000, ypos)
1915-
else
1916-
" Position must be bigger than the getwinpos() result of Vim itself.
1917-
let [xroot, yroot] = getwinpos()
1918-
call assert_inrange(xroot + 2, xroot + 1000, xpos)
1919-
call assert_inrange(yroot + 2, yroot + 1000, ypos)
1920-
endif
1914+
" Position must be bigger than the getwinpos() result of Vim itself.
1915+
let [xroot, yroot] = getwinpos()
1916+
call assert_inrange(xroot + 2, xroot + 1000, xpos)
1917+
call assert_inrange(yroot + 2, yroot + 1000, ypos)
19211918

19221919
call term_wait(buf)
19231920
call term_sendkeys(buf, ":q\<CR>")

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -771,6 +771,8 @@ static char *(features[]) =
771771

772772
static int included_patches[] =
773773
{ /* Add new patch number below this line */
774+
/**/
775+
1132,
774776
/**/
775777
1131,
776778
/**/

0 commit comments

Comments
 (0)