summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-04-09 21:17:32 +0200
committerBram Moolenaar <Bram@vim.org>2019-04-09 21:17:32 +0200
commit1b55797e90c5fe41691afe43aed8afffbbcebeb9 (patch)
tree7f5530115c8e9d978dacc78a5fac9cfb393369b2
parent46ad288b9b2a6eb0430cf802ff5ce68a58629897 (diff)
downloadvim-git-1b55797e90c5fe41691afe43aed8afffbbcebeb9.tar.gz
patch 8.1.1141: terminal winpos test fails with very large terminalv8.1.1141
Problem: Terminal winpos test fails with very large terminal. (Dominique Pelle) Solution: Compute the expected size more accurately. (closes #4228)
-rw-r--r--src/testdir/test_terminal.vim10
-rw-r--r--src/version.c2
2 files changed, 10 insertions, 2 deletions
diff --git a/src/testdir/test_terminal.vim b/src/testdir/test_terminal.vim
index e6ae7e25a..e337c4775 100644
--- a/src/testdir/test_terminal.vim
+++ b/src/testdir/test_terminal.vim
@@ -1912,9 +1912,15 @@ func Test_terminal_getwinpos()
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()
- call assert_inrange(xroot + 2, xroot + 1000, xpos)
- call assert_inrange(yroot + 2, yroot + 1000, ypos)
+ 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>")
diff --git a/src/version.c b/src/version.c
index 7c3490e7e..4dc55f4f8 100644
--- a/src/version.c
+++ b/src/version.c
@@ -772,6 +772,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1141,
+/**/
1140,
/**/
1139,