summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.1171
blob: d65cb93a28866a473af9bafc20a3317d20a0ad4e (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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
To: vim_dev@googlegroups.com
Subject: Patch 8.1.1171
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.1171
Problem:    Statusline test could fail in large terminal.
Solution:   Make the test work on a huge terminal. (Dominique Pelle,
            closes #4255)
Files:	    src/testdir/test_statusline.vim


*** ../vim-8.1.1170/src/testdir/test_statusline.vim	2017-10-26 18:10:36.000000000 +0200
--- src/testdir/test_statusline.vim	2019-04-14 13:21:11.700906371 +0200
***************
*** 62,84 ****
    only
    set laststatus=2
    set splitbelow
!   call setline(1, range(1, 200))
  
    " %b: Value of character under cursor.
    " %B: As above, in hexadecimal.
!   call cursor(180, 2)
    set statusline=%b,%B
!   call assert_match('^56,38\s*$', s:get_statusline())
  
    " %o: Byte number in file of byte under cursor, first byte is 1.
    " %O: As above, in hexadecimal.
    set statusline=%o,%O
    set fileformat=dos
!   call assert_match('^789,315\s*$', s:get_statusline())
    set fileformat=mac
!   call assert_match('^610,262\s*$', s:get_statusline())
    set fileformat=unix
!   call assert_match('^610,262\s*$', s:get_statusline())
    set fileformat&
  
    " %f: Path to the file in the buffer, as typed or relative to current dir.
--- 62,84 ----
    only
    set laststatus=2
    set splitbelow
!   call setline(1, range(1, 10000))
  
    " %b: Value of character under cursor.
    " %B: As above, in hexadecimal.
!   call cursor(9000, 1)
    set statusline=%b,%B
!   call assert_match('^57,39\s*$', s:get_statusline())
  
    " %o: Byte number in file of byte under cursor, first byte is 1.
    " %O: As above, in hexadecimal.
    set statusline=%o,%O
    set fileformat=dos
!   call assert_match('^52888,CE98\s*$', s:get_statusline())
    set fileformat=mac
!   call assert_match('^43889,AB71\s*$', s:get_statusline())
    set fileformat=unix
!   call assert_match('^43889,AB71\s*$', s:get_statusline())
    set fileformat&
  
    " %f: Path to the file in the buffer, as typed or relative to current dir.
***************
*** 112,118 ****
    " %L: Number of line in buffer.
    " %c: Column number.
    set statusline=%l/%L,%c
!   call assert_match('^180/200,2\s*$', s:get_statusline())
  
    " %m: Modified flag, text is "[+]", "[-]" if 'modifiable' is off.
    " %M: Modified flag, text is ",+" or ",-".
--- 112,118 ----
    " %L: Number of line in buffer.
    " %c: Column number.
    set statusline=%l/%L,%c
!   call assert_match('^9000/10000,1\s*$', s:get_statusline())
  
    " %m: Modified flag, text is "[+]", "[-]" if 'modifiable' is off.
    " %M: Modified flag, text is ",+" or ",-".
***************
*** 136,142 ****
    call assert_match('^0,Top\s*$', s:get_statusline())
    norm G
    call assert_match('^100,Bot\s*$', s:get_statusline())
!   180
    " Don't check the exact percentage as it depends on the window size
    call assert_match('^90,\(Top\|Bot\|\d\+%\)\s*$', s:get_statusline())
  
--- 136,142 ----
    call assert_match('^0,Top\s*$', s:get_statusline())
    norm G
    call assert_match('^100,Bot\s*$', s:get_statusline())
!   9000
    " Don't check the exact percentage as it depends on the window size
    call assert_match('^90,\(Top\|Bot\|\d\+%\)\s*$', s:get_statusline())
  
***************
*** 165,171 ****
  
    " %v: Virtual column number.
    " %V: Virtual column number as -{num}. Not displayed if equal to 'c'.
!   call cursor(180, 2)
    set statusline=%v,%V
    call assert_match('^2,\s*$', s:get_statusline())
    set virtualedit=all
--- 165,171 ----
  
    " %v: Virtual column number.
    " %V: Virtual column number as -{num}. Not displayed if equal to 'c'.
!   call cursor(9000, 2)
    set statusline=%v,%V
    call assert_match('^2,\s*$', s:get_statusline())
    set virtualedit=all
***************
*** 195,214 ****
  
    " Test min/max width, leading zeroes, left/right justify.
    set statusline=%04B
!   call cursor(180, 2)
!   call assert_match('^0038\s*$', s:get_statusline())
    set statusline=#%4B#
!   call assert_match('^#  38#\s*$', s:get_statusline())
    set statusline=#%-4B#
!   call assert_match('^#38  #\s*$', s:get_statusline())
    set statusline=%.6f
    call assert_match('^<sline\s*$', s:get_statusline())
  
    " %<: Where to truncate.
!   exe 'set statusline=a%<b' . repeat('c', 1000) . 'd'
!   call assert_match('^a<c*d$', s:get_statusline())
!   exe 'set statusline=a' . repeat('b', 1000) . '%<c'
!   call assert_match('^ab*>$', s:get_statusline())
  
    "%{: Evaluate expression between '%{' and '}' and substitute result.
    syntax on
--- 195,220 ----
  
    " Test min/max width, leading zeroes, left/right justify.
    set statusline=%04B
!   call cursor(9000, 1)
!   call assert_match('^0039\s*$', s:get_statusline())
    set statusline=#%4B#
!   call assert_match('^#  39#\s*$', s:get_statusline())
    set statusline=#%-4B#
!   call assert_match('^#39  #\s*$', s:get_statusline())
    set statusline=%.6f
    call assert_match('^<sline\s*$', s:get_statusline())
  
    " %<: Where to truncate.
!   " First check with when %< should not truncate with many columns
!   exe 'set statusline=a%<b' . repeat('c', &columns - 3) . 'd'
!   call assert_match('^abc\+d$', s:get_statusline())
!   exe 'set statusline=a' . repeat('b', &columns - 2) . '%<c'
!   call assert_match('^ab\+c$', s:get_statusline())
!   " Then check when %< should truncate when there with too few columns.
!   exe 'set statusline=a%<b' . repeat('c', &columns - 2) . 'd'
!   call assert_match('^a<c\+d$', s:get_statusline())
!   exe 'set statusline=a' . repeat('b', &columns - 1) . '%<c'
!   call assert_match('^ab\+>$', s:get_statusline())
  
    "%{: Evaluate expression between '%{' and '}' and substitute result.
    syntax on
*** ../vim-8.1.1170/src/version.c	2019-04-13 23:18:18.204706885 +0200
--- src/version.c	2019-04-14 13:23:02.552186269 +0200
***************
*** 773,774 ****
--- 773,776 ----
  {   /* Add new patch number below this line */
+ /**/
+     1171,
  /**/

-- 
GOD: That is your purpose Arthur ... the Quest for the Holy Grail ...
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

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