@@ -1889,6 +1889,10 @@ func Test_terminal_statusline()
18891889endfunc
18901890
18911891func 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> " )
0 commit comments