blob: 38ef52b47fbc69fbe1b0487bfc7feb0f5ee2b564 (
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
|
To: vim_dev@googlegroups.com
Subject: Patch 8.1.1348
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.1348
Problem: Running tests may cause the window to move.
Solution: Correct the reported window position for the offset with the
position after ":winpos". Works around an xterm bug.
Files: src/testdir/test_edit.vim
*** ../vim-8.1.1347/src/testdir/test_edit.vim 2019-04-27 18:00:29.851064563 +0200
--- src/testdir/test_edit.vim 2019-05-18 16:51:30.495698892 +0200
***************
*** 1359,1367 ****
return
endtry
! " Try to get the Vim window position before setting 'columns'.
let winposx = getwinposx()
let winposy = getwinposy()
let save_columns = &columns
" Need at least about 1100 columns to reproduce the problem.
set columns=2000
--- 1359,1384 ----
return
endtry
! " Try to get the Vim window position before setting 'columns', so that we can
! " move the window back to where it was.
let winposx = getwinposx()
let winposy = getwinposy()
+
+ if winposx >= 0 && winposy >= 0 && !has('gui_running')
+ " We did get the window position, but xterm may report the wrong numbers.
+ " Move the window to the reported position and compute any offset.
+ exe 'winpos ' . winposx . ' ' . winposy
+ sleep 100m
+ let x = getwinposx()
+ if x >= 0
+ let winposx += winposx - x
+ endif
+ let y = getwinposy()
+ if y >= 0
+ let winposy += winposy - y
+ endif
+ endif
+
let save_columns = &columns
" Need at least about 1100 columns to reproduce the problem.
set columns=2000
*** ../vim-8.1.1347/src/version.c 2019-05-18 15:36:06.493897710 +0200
--- src/version.c 2019-05-18 16:53:03.739139925 +0200
***************
*** 769,770 ****
--- 769,772 ----
{ /* Add new patch number below this line */
+ /**/
+ 1348,
/**/
--
The budget process was invented by an alien race of sadistic beings who
resemble large cats.
(Scott Adams - The Dilbert principle)
/// 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 ///
|