summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0045
blob: b889adae6f6a951e13541625fe7bd128502cb8cb (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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0045
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.0045 (after 8.1.0038)
Problem:    Popup test isn't run completely.
Solution:   Remove "finish".  Clean up function definitions.
Files:	    src/testdir/test_popup.vim


*** ../vim-8.1.0044/src/testdir/test_popup.vim	2018-06-07 15:18:36.826611722 +0200
--- src/testdir/test_popup.vim	2018-06-12 15:14:43.418467569 +0200
***************
*** 6,12 ****
  let g:months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
  let g:setting = ''
  
! func! ListMonths()
    if g:setting != ''
      exe ":set" g:setting
    endif
--- 6,12 ----
  let g:months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
  let g:setting = ''
  
! func ListMonths()
    if g:setting != ''
      exe ":set" g:setting
    endif
***************
*** 19,25 ****
    return ''
  endfunc
  
! func! Test_popup_complete2()
    " Although the popupmenu is not visible, this does not mean completion mode
    " has ended. After pressing <f5> to complete the currently typed char, Vim
    " still stays in the first state of the completion (:h ins-completion-menu),
--- 19,25 ----
    return ''
  endfunc
  
! func Test_popup_complete2()
    " Although the popupmenu is not visible, this does not mean completion mode
    " has ended. After pressing <f5> to complete the currently typed char, Vim
    " still stays in the first state of the completion (:h ins-completion-menu),
***************
*** 34,42 ****
    call assert_equal(["Dece", "", "December2015"], getline(1,3))
    %d
    bw!
! endfu
  
! func! Test_popup_complete()
    new
    inoremap <f5> <c-r>=ListMonths()<cr>
  
--- 34,42 ----
    call assert_equal(["Dece", "", "December2015"], getline(1,3))
    %d
    bw!
! endfunc
  
! func Test_popup_complete()
    new
    inoremap <f5> <c-r>=ListMonths()<cr>
  
***************
*** 215,224 ****
    call feedkeys("aM\<f5>\<enter>\<esc>", 'tx')
    call assert_equal(["March", "M", "March"], getline(1,4))
    %d
! endfu
  
  
! func! Test_popup_completion_insertmode()
    new
    inoremap <F5> <C-R>=ListMonths()<CR>
  
--- 215,224 ----
    call feedkeys("aM\<f5>\<enter>\<esc>", 'tx')
    call assert_equal(["March", "M", "March"], getline(1,4))
    %d
! endfunc
  
  
! func Test_popup_completion_insertmode()
    new
    inoremap <F5> <C-R>=ListMonths()<CR>
  
***************
*** 247,266 ****
    iunmap <F5>
  endfunc
  
- " TODO: Fix what breaks after this line.
- " - Do not use "q!", it may exit Vim if there is an error
- finish
- 
  func Test_noinsert_complete()
!   function! s:complTest1() abort
      call complete(1, ['source', 'soundfold'])
      return ''
!   endfunction
  
!   function! s:complTest2() abort
      call complete(1, ['source', 'soundfold'])
      return ''
!   endfunction
  
    new
    set completeopt+=noinsert
--- 247,262 ----
    iunmap <F5>
  endfunc
  
  func Test_noinsert_complete()
!   func! s:complTest1() abort
      call complete(1, ['source', 'soundfold'])
      return ''
!   endfunc
  
!   func! s:complTest2() abort
      call complete(1, ['source', 'soundfold'])
      return ''
!   endfunc
  
    new
    set completeopt+=noinsert
***************
*** 281,289 ****
  endfunc
  
  func Test_compl_vim_cmds_after_register_expr()
!   function! s:test_func()
      return 'autocmd '
!   endfunction
    augroup AAAAA_Group
      au!
    augroup END
--- 277,285 ----
  endfunc
  
  func Test_compl_vim_cmds_after_register_expr()
!   func! s:test_func()
      return 'autocmd '
!   endfunc
    augroup AAAAA_Group
      au!
    augroup END
***************
*** 330,336 ****
    else
      return ['twodef', 'twoDEF']
    endif
! endfunction
  
  " Test that nothing happens if the 'completefunc' opens
  " a new window (no completion, no crash)
--- 326,332 ----
    else
      return ['twodef', 'twoDEF']
    endif
! endfunc
  
  " Test that nothing happens if the 'completefunc' opens
  " a new window (no completion, no crash)
***************
*** 407,413 ****
    q!
  endfunc
  
! function UndoComplete()
    call complete(1, ['January', 'February', 'March',
          \ 'April', 'May', 'June', 'July', 'August', 'September',
          \ 'October', 'November', 'December'])
--- 403,409 ----
    q!
  endfunc
  
! func UndoComplete()
    call complete(1, ['January', 'February', 'March',
          \ 'April', 'May', 'June', 'July', 'August', 'September',
          \ 'October', 'November', 'December'])
***************
*** 444,450 ****
    q!
  endfunc
  
! function! DummyCompleteFive(findstart, base)
    if a:findstart
      return 0
    else
--- 440,446 ----
    q!
  endfunc
  
! func DummyCompleteFive(findstart, base)
    if a:findstart
      return 0
    else
***************
*** 489,495 ****
    q!
  endfunc
  
! function! DummyCompleteSix()
    call complete(1, ['Hello', 'World'])
    return ''
  endfunction
--- 485,491 ----
    q!
  endfunc
  
! func DummyCompleteSix()
    call complete(1, ['Hello', 'World'])
    return ''
  endfunction
***************
*** 577,583 ****
    bwipe!
  endfunc
  
! fun MessCompleteMonths()
    for m in split("Jan Feb Mar Apr May Jun Jul Aug Sep")
      call complete_add(m)
      if complete_check()
--- 573,579 ----
    bwipe!
  endfunc
  
! func MessCompleteMonths()
    for m in split("Jan Feb Mar Apr May Jun Jul Aug Sep")
      call complete_add(m)
      if complete_check()
***************
*** 585,598 ****
      endif
    endfor
    return []
! endfun
  
! fun MessCompleteMore()
    call complete(1, split("Oct Nov Dec"))
    return []
! endfun
  
! fun MessComplete(findstart, base)
    if a:findstart
      let line = getline('.')
      let start = col('.') - 1
--- 581,594 ----
      endif
    endfor
    return []
! endfunc
  
! func MessCompleteMore()
    call complete(1, split("Oct Nov Dec"))
    return []
! endfunc
  
! func MessComplete(findstart, base)
    if a:findstart
      let line = getline('.')
      let start = col('.') - 1
***************
*** 605,611 ****
      call MessCompleteMore()
      return []
    endif
! endf
  
  func Test_complete_func_mess()
    " Calling complete() after complete_add() in 'completefunc' is wrong, but it
--- 601,607 ----
      call MessCompleteMore()
      return []
    endif
! endfunc
  
  func Test_complete_func_mess()
    " Calling complete() after complete_add() in 'completefunc' is wrong, but it
***************
*** 835,841 ****
    bwipe!
  endfunc
  
! fun! Test_complete_o_tab()
    let s:o_char_pressed = 0
  
    fun! s:act_on_text_changed()
--- 831,837 ----
    bwipe!
  endfunc
  
! func Test_complete_o_tab()
    let s:o_char_pressed = 0
  
    fun! s:act_on_text_changed()
***************
*** 843,849 ****
        let s:o_char_pressed = 0
        call feedkeys("\<c-x>\<c-n>", 'i')
      endif
!   endf
  
    set completeopt=menu,noselect
    new
--- 839,845 ----
        let s:o_char_pressed = 0
        call feedkeys("\<c-x>\<c-n>", 'i')
      endif
!   endfunc
  
    set completeopt=menu,noselect
    new
***************
*** 862,868 ****
    bwipe!
    set completeopt&
    delfunc s:act_on_text_changed
! endf
  
  
  " vim: shiftwidth=2 sts=2 expandtab
--- 858,864 ----
    bwipe!
    set completeopt&
    delfunc s:act_on_text_changed
! endfunc
  
  
  " vim: shiftwidth=2 sts=2 expandtab
*** ../vim-8.1.0044/src/version.c	2018-06-12 14:58:35.566840630 +0200
--- src/version.c	2018-06-12 15:21:43.280832536 +0200
***************
*** 763,764 ****
--- 763,766 ----
  {   /* Add new patch number below this line */
+ /**/
+     45,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
37. You start looking for hot HTML addresses in public restrooms.

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