Skip to content

Commit 942db23

Browse files
committed
Update runtime files
1 parent 0fa0967 commit 942db23

33 files changed

Lines changed: 312 additions & 218 deletions

runtime/autoload/clojurecomplete.vim

Lines changed: 9 additions & 8 deletions
Large diffs are not rendered by default.

runtime/autoload/phpcomplete.vim

Lines changed: 38 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
" Maintainer: Dávid Szabó ( complex857 AT gmail DOT com )
44
" Previous Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
55
" URL: https://github.com/shawncplus/phpcomplete.vim
6-
" Last Change: 2018 Oct 10
6+
" Last Change: 2021 Feb 08
77
"
88
" OPTIONS:
99
"
@@ -122,7 +122,6 @@ function! phpcomplete#CompletePHP(findstart, base) " {{{
122122
endif
123123
endif
124124

125-
126125
" If exists b:php_menu it means completion was already constructed we
127126
" don't need to do anything more
128127
if exists("b:php_menu")
@@ -148,8 +147,6 @@ function! phpcomplete#CompletePHP(findstart, base) " {{{
148147
try
149148
let eventignore = &eventignore
150149
let &eventignore = 'all'
151-
let winheight = winheight(0)
152-
let winnr = winnr()
153150

154151
let [current_namespace, imports] = phpcomplete#GetCurrentNameSpace(getline(0, line('.')))
155152

@@ -183,7 +180,6 @@ function! phpcomplete#CompletePHP(findstart, base) " {{{
183180
endif
184181

185182
if filereadable(classlocation)
186-
let classfile = readfile(classlocation)
187183
let classcontent = ''
188184
let classcontent .= "\n".phpcomplete#GetClassContents(classlocation, classname)
189185
let sccontent = split(classcontent, "\n")
@@ -217,7 +213,6 @@ function! phpcomplete#CompletePHP(findstart, base) " {{{
217213
return phpcomplete#CompleteGeneral(a:base, current_namespace, imports)
218214
endif
219215
finally
220-
silent! exec winnr.'resize '.winheight
221216
let &eventignore = eventignore
222217
endtry
223218
endfunction
@@ -1025,7 +1020,7 @@ function! phpcomplete#CompleteUserClass(context, base, sccontent, visibility) "
10251020
let c_var = '$'.c_var
10261021
endif
10271022
let c_variables[c_var] = ''
1028-
if g:phpcomplete_parse_docblock_comments && len(get(variables, var_index)) > 0
1023+
if g:phpcomplete_parse_docblock_comments && len(get(variables, var_index, '')) > 0
10291024
let c_doc[c_var] = phpcomplete#GetDocBlock(a:sccontent, variables[var_index])
10301025
endif
10311026
let var_index += 1
@@ -2082,26 +2077,17 @@ function! phpcomplete#GetClassContentsStructure(file_path, file_lines, class_nam
20822077
" ...
20832078
" ]
20842079
"
2085-
let full_file_path = fnamemodify(a:file_path, ':p')
20862080
let class_name_pattern = '[a-zA-Z_\x7f-\xff\\][a-zA-Z_0-9\x7f-\xff\\]*'
2087-
let cfile = join(a:file_lines, "\n")
2081+
let full_file_path = fnamemodify(a:file_path, ':p')
20882082
let result = []
2089-
" We use new buffer and (later) normal! because
2090-
" this is the most efficient way. The other way
2091-
" is to go through the looong string looking for
2092-
" matching {}
2093-
2094-
" remember the window we started at
2095-
let phpcomplete_original_window = winnr()
2096-
2097-
silent! below 1new
2098-
silent! 0put =cfile
2099-
call search('\c\(class\|interface\|trait\)\_s\+'.a:class_name.'\(\>\|$\)')
2100-
let cfline = line('.')
2101-
call search('{')
2102-
let endline = line('.')
2103-
2104-
let content = join(getline(cfline, endline), "\n")
2083+
let popup_id = popup_create(a:file_lines, {'hidden': v:true})
2084+
2085+
call win_execute(popup_id, 'call search(''\c\(class\|interface\|trait\)\_s\+'.a:class_name.'\(\>\|$\)'')')
2086+
call win_execute(popup_id, "let cfline = line('.')")
2087+
call win_execute(popup_id, "call search('{')")
2088+
call win_execute(popup_id, "let endline = line('.')")
2089+
2090+
call win_execute(popup_id, 'let content = join(getline('.cfline.', '.endline.'), "\n")')
21052091
" Catch extends
21062092
if content =~? 'extends'
21072093
let extends_string = matchstr(content, '\(class\|interface\)\_s\+'.a:class_name.'\_.\+extends\_s\+\zs\('.class_name_pattern.'\(,\|\_s\)*\)\+\ze\(extends\|{\)')
@@ -2117,37 +2103,39 @@ function! phpcomplete#GetClassContentsStructure(file_path, file_lines, class_nam
21172103
else
21182104
let implemented_interfaces = []
21192105
endif
2120-
call searchpair('{', '', '}', 'W')
2121-
let class_closing_bracket_line = line('.')
2106+
2107+
call win_execute(popup_id, 'let [class_closing_bracket_line, class_closing_bracket_col] = searchpairpos("{", "", "}", "W")')
21222108

21232109
" Include class docblock
21242110
let doc_line = cfline - 1
2125-
if getline(doc_line) =~? '^\s*\*/'
2111+
call win_execute(popup_id, 'let l = getline('.doc_line.')')
2112+
if l =~? '^\s*\*/'
21262113
while doc_line != 0
2127-
if getline(doc_line) =~? '^\s*/\*\*'
2114+
call win_execute(popup_id, 'let l = getline('.doc_line.')')
2115+
if l =~? '^\s*/\*\*'
21282116
let cfline = doc_line
21292117
break
21302118
endif
21312119
let doc_line -= 1
21322120
endwhile
21332121
endif
21342122

2135-
let classcontent = join(getline(cfline, class_closing_bracket_line), "\n")
2123+
call win_execute(popup_id, 'let classcontent = join(getline('.cfline.', '.class_closing_bracket_line.'), "\n")')
21362124

21372125
let used_traits = []
21382126
" move back to the line next to the class's definition
2139-
call cursor(endline + 1, 1)
2127+
call win_execute(popup_id, 'call cursor('.(endline + 1).', 1)')
21402128
let keep_searching = 1
21412129
while keep_searching != 0
21422130
" try to grab "use..." keywords
2143-
let [lnum, col] = searchpos('\c^\s\+use\s\+'.class_name_pattern, 'cW', class_closing_bracket_line)
2144-
let syn_name = synIDattr(synID(lnum, col, 0), "name")
2131+
call win_execute(popup_id, 'let [lnum, col] = searchpos(''\c^\s\+use\s\+'.class_name_pattern.''', "cW", '.class_closing_bracket_line.')')
2132+
call win_execute(popup_id, 'let syn_name = synIDattr(synID('.lnum.', '.col.', 0), "name")')
21452133
if syn_name =~? 'string\|comment'
2146-
call cursor(lnum + 1, 1)
2134+
call win_execute(popup_id, 'call cursor('.(lnum + 1).', 1)')
21472135
continue
21482136
endif
21492137

2150-
let trait_line = getline(lnum)
2138+
call win_execute(popup_id, 'let trait_line = getline('.lnum.')')
21512139
if trait_line !~? ';'
21522140
" try to find the next line containing ';'
21532141
let l = lnum
@@ -2157,25 +2145,23 @@ function! phpcomplete#GetClassContentsStructure(file_path, file_lines, class_nam
21572145
while search_line !~? ';' && l > 0
21582146
" file lines are reversed so we need to go backwards
21592147
let l += 1
2160-
let search_line = getline(l)
2148+
call win_execute(popup_id, 'let search_line = getline('.l.')')
21612149
let trait_line .= ' '.substitute(search_line, '\(^\s\+\|\s\+$\)', '', 'g')
21622150
endwhile
21632151
endif
21642152
let use_expression = matchstr(trait_line, '^\s*use\s\+\zs.\{-}\ze;')
21652153
let use_parts = map(split(use_expression, '\s*,\s*'), 'substitute(v:val, "\\s+", " ", "g")')
21662154
let used_traits += map(use_parts, 'substitute(v:val, "\\s", "", "g")')
2167-
call cursor(lnum + 1, 1)
2155+
call win_execute(popup_id, 'call cursor('.(lnum + 1).', 1)')
21682156

21692157
if [lnum, col] == [0, 0]
21702158
let keep_searching = 0
21712159
endif
21722160
endwhile
21732161

2174-
silent! bw! %
2162+
call popup_close(popup_id)
21752163

21762164
let [current_namespace, imports] = phpcomplete#GetCurrentNameSpace(a:file_lines[0:cfline])
2177-
" go back to original window
2178-
exe phpcomplete_original_window.'wincmd w'
21792165
call add(result, {
21802166
\ 'class': a:class_name,
21812167
\ 'content': classcontent,
@@ -2532,40 +2518,37 @@ function! phpcomplete#FormatDocBlock(info) " {{{
25322518
endif
25332519

25342520
return res
2535-
endfunction!
2521+
endfunction
25362522
" }}}
25372523

25382524
function! phpcomplete#GetCurrentNameSpace(file_lines) " {{{
2539-
let original_window = winnr()
2540-
2541-
silent! below 1new
2542-
silent! 0put =a:file_lines
2543-
normal! G
2525+
let popup_id = popup_create(a:file_lines, {'hidden': v:true})
2526+
call win_execute(popup_id, 'normal! G')
25442527

25452528
" clear out classes, functions and other blocks
25462529
while 1
2547-
let block_start_pos = searchpos('\c\(class\|trait\|function\|interface\)\s\+\_.\{-}\zs{', 'Web')
2530+
call win_execute(popup_id, 'let block_start_pos = searchpos(''\c\(class\|trait\|function\|interface\)\s\+\_.\{-}\zs{'', "Web")')
25482531
if block_start_pos == [0, 0]
25492532
break
25502533
endif
2551-
let block_end_pos = searchpairpos('{', '', '}\|\%$', 'W', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"')
2534+
call win_execute(popup_id, 'let block_end_pos = searchpairpos("{", "", ''}\|\%$'', "W", ''synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"'')')
25522535

2536+
let popup_lines = winbufnr(popup_id)->getbufline(1, '$')
25532537
if block_end_pos != [0, 0]
25542538
" end of the block found, just delete it
2555-
silent! exec block_start_pos[0].','.block_end_pos[0].'d _'
2539+
call remove(popup_lines, block_start_pos[0] - 1, block_end_pos[0] - 1)
25562540
else
25572541
" block pair not found, use block start as beginning and the end
25582542
" of the buffer instead
2559-
silent! exec block_start_pos[0].',$d _'
2543+
call remove(popup_lines, block_start_pos[0] - 1, -1)
25602544
endif
2545+
call popup_settext(popup_id, popup_lines)
25612546
endwhile
2562-
normal! G
2547+
call win_execute(popup_id, 'normal! G', 'silent!')
25632548

25642549
" grab the remains
2565-
let file_lines = reverse(getline(1, line('.') - 1))
2566-
2567-
silent! bw! %
2568-
exe original_window.'wincmd w'
2550+
call win_execute(popup_id, "let file_lines = reverse(getline(1, line('.')-1))")
2551+
call popup_close(popup_id)
25692552

25702553
let namespace_name_pattern = '[a-zA-Z_\x7f-\xff\\][a-zA-Z_0-9\x7f-\xff\\]*'
25712554
let i = 0

runtime/doc/diff.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*diff.txt* For Vim version 8.2. Last change: 2019 Nov 10
1+
*diff.txt* For Vim version 8.2. Last change: 2021 Feb 10
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar

runtime/doc/eval.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*eval.txt* For Vim version 8.2. Last change: 2021 Jan 31
1+
*eval.txt* For Vim version 8.2. Last change: 2021 Feb 10
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -5903,6 +5903,7 @@ getreg([{regname} [, 1 [, {list}]]]) *getreg()*
59035903
When the register was not set an empty list is returned.
59045904

59055905
If {regname} is not specified, |v:register| is used.
5906+
In |Vim9-script| {regname} must be one character.
59065907

59075908
Can also be used as a |method|: >
59085909
GetRegname()->getreg()
@@ -5930,6 +5931,7 @@ getreginfo([{regname}]) *getreginfo()*
59305931
will be returned.
59315932
If {regname} is not specified, |v:register| is used.
59325933
The returned Dictionary can be passed to |setreg()|.
5934+
In |Vim9-script| {regname} must be one character.
59335935

59345936
Can also be used as a |method|: >
59355937
GetRegname()->getreginfo()
@@ -5943,6 +5945,7 @@ getregtype([{regname}]) *getregtype()*
59435945
"" for an empty or unknown register
59445946
<CTRL-V> is one character with value 0x16.
59455947
If {regname} is not specified, |v:register| is used.
5948+
In |Vim9-script| {regname} must be one character.
59465949

59475950
Can also be used as a |method|: >
59485951
GetRegname()->getregtype()
@@ -9658,6 +9661,7 @@ setqflist({list} [, {action} [, {what}]]) *setqflist()*
96589661
setreg({regname}, {value} [, {options}])
96599662
Set the register {regname} to {value}.
96609663
If {regname} is "" or "@", the unnamed register '"' is used.
9664+
In |Vim9-script| {regname} must be one character.
96619665

96629666
{value} may be any value returned by |getreg()| or
96639667
|getreginfo()|, including a |List| or |Dict|.

runtime/doc/indent.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -610,14 +610,14 @@ the use of square and curly brackets, and otherwise by community convention.
610610
These conventions are not universally followed, so the Clojure indent script
611611
offers a few configurable options, listed below.
612612

613-
If the current vim does not include |searchpairpos()|, the indent script falls
613+
If the current vim does not include searchpairpos(), the indent script falls
614614
back to normal 'lisp' indenting, and the following options are ignored.
615615

616616
*g:clojure_maxlines*
617617

618-
Set maximum scan distance of |searchpairpos()|. Larger values trade
619-
performance for correctness when dealing with very long forms. A value of 0
620-
will scan without limits.
618+
Set maximum scan distance of searchpairpos(). Larger values trade performance
619+
for correctness when dealing with very long forms. A value of 0 will scan
620+
without limits.
621621
>
622622
" Default
623623
let g:clojure_maxlines = 100

runtime/doc/index.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*index.txt* For Vim version 8.2. Last change: 2021 Jan 15
1+
*index.txt* For Vim version 8.2. Last change: 2021 Feb 11
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1176,6 +1176,7 @@ tag command action ~
11761176
|:bNext| :bN[ext] go to previous buffer in the buffer list
11771177
|:ball| :ba[ll] open a window for each buffer in the buffer list
11781178
|:badd| :bad[d] add buffer to the buffer list
1179+
|:balt| :balt like ":badd" but also set the alternate file
11791180
|:bdelete| :bd[elete] remove a buffer from the buffer list
11801181
|:behave| :be[have] set mouse and selection behavior
11811182
|:belowright| :bel[owright] make split window appear right or below

runtime/doc/options.txt

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*options.txt* For Vim version 8.2. Last change: 2021 Jan 08
1+
*options.txt* For Vim version 8.2. Last change: 2021 Feb 13
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1568,7 +1568,11 @@ A jump table for the options with a short description can be found at |Q_op|.
15681568
{only in GUI versions or when the |+xterm_clipboard|
15691569
feature is included}
15701570
This option is a list of comma separated names.
1571-
These names are recognized:
1571+
Note: if one of the items is "exclude:", then you can't add an item
1572+
after that. Therefore do append an item with += but use ^= to
1573+
prepend, e.g.: >
1574+
set clipboard^=unnamed
1575+
< These names are recognized:
15721576

15731577
*clipboard-unnamed*
15741578
unnamed When included, Vim will use the clipboard register '*'
@@ -4882,8 +4886,10 @@ A jump table for the options with a short description can be found at |Q_op|.
48824886
*lcs-lead*
48834887
lead:c Character to show for leading spaces. When omitted,
48844888
leading spaces are blank. Overrides the "space"
4885-
setting for leading spaces.
4886-
*lcs-trail*
4889+
setting for leading spaces. You can combine it with
4890+
"tab:", for example: >
4891+
:set listchars+=tab:>-,lead:.
4892+
< *lcs-trail*
48874893
trail:c Character to show for trailing spaces. When omitted,
48884894
trailing spaces are blank. Overrides the "space"
48894895
setting for trailing spaces.
@@ -6232,7 +6238,7 @@ A jump table for the options with a short description can be found at |Q_op|.
62326238
<
62336239
*'runtimepath'* *'rtp'* *vimfiles*
62346240
'runtimepath' 'rtp' string (default:
6235-
Unix: "$HOME/.vim,
6241+
Unix: "$HOME/.vim,
62366242
$VIM/vimfiles,
62376243
$VIMRUNTIME,
62386244
$VIM/vimfiles/after,
@@ -6242,7 +6248,7 @@ A jump table for the options with a short description can be found at |Q_op|.
62426248
$VIMRUNTIME,
62436249
$VIM/vimfiles/after,
62446250
home:vimfiles/after"
6245-
PC: "$HOME/vimfiles,
6251+
MS-Windows: "$HOME/vimfiles,
62466252
$VIM/vimfiles,
62476253
$VIMRUNTIME,
62486254
$VIM/vimfiles/after,
@@ -6254,8 +6260,8 @@ A jump table for the options with a short description can be found at |Q_op|.
62546260
$VIM/vimfiles,
62556261
$VIMRUNTIME,
62566262
$VIM/vimfiles/after,
6257-
$BE_USER_SETTINGS/vim/after")
6258-
VMS: "sys$login:vimfiles,
6263+
$BE_USER_SETTINGS/vim/after"
6264+
VMS: "sys$login:vimfiles,
62596265
$VIM/vimfiles,
62606266
$VIMRUNTIME,
62616267
$VIM/vimfiles/after,

runtime/doc/popup.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*popup.txt* For Vim version 8.2. Last change: 2021 Jan 21
1+
*popup.txt* For Vim version 8.2. Last change: 2021 Feb 06
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -620,7 +620,8 @@ The second argument of |popup_create()| is a dictionary with options:
620620
property moves. Use an empty string to remove. See
621621
|popup-textprop-pos|.
622622
textpropwin What window to search for the text property. When
623-
omitted or invalid the current window is used.
623+
omitted or invalid the current window is used. Used
624+
when "textprop" is present.
624625
textpropid Used to identify the text property when "textprop" is
625626
present. Use zero to reset.
626627
fixed When FALSE (the default), and:

runtime/doc/quickfix.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*quickfix.txt* For Vim version 8.2. Last change: 2020 May 31
1+
*quickfix.txt* For Vim version 8.2. Last change: 2021 Feb 05
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1025,6 +1025,12 @@ commands can be combined to create a NewGrep command: >
10251025
'smartcase' is not used.
10261026
If {pattern} is empty (e.g. // is specified), the last
10271027
used search pattern is used. |last-pattern|
1028+
1029+
|QuickFixCmdPre| and |QuickFixCmdPost| are triggered.
1030+
A file that is opened for matching may use a buffer
1031+
number, but it is reused if possible to avoid
1032+
consuming buffer numbers.
1033+
10281034
:{count}vim[grep] ...
10291035
When a number is put before the command this is used
10301036
as the maximum number of matches to find. Use

0 commit comments

Comments
 (0)