Skip to content

Commit 91e15e1

Browse files
committed
Updated runtime files.
1 parent 3fa57e0 commit 91e15e1

13 files changed

Lines changed: 156 additions & 134 deletions

File tree

runtime/autoload/phpcomplete.vim

Lines changed: 7 additions & 5 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: 2014 Jul 24
6+
" Last Change: 2014 Aug 10
77
"
88
" OPTIONS:
99
"
@@ -94,9 +94,9 @@ function! phpcomplete#CompletePHP(findstart, base) " {{{
9494
" Check if we are inside of PHP markup
9595
let pos = getpos('.')
9696
let phpbegin = searchpairpos('<?', '', '?>', 'bWn',
97-
\ 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\|comment"')
97+
\ 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"')
9898
let phpend = searchpairpos('<?', '', '?>', 'Wn',
99-
\ 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\|comment"')
99+
\ 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"')
100100

101101
if phpbegin == [0,0] && phpend == [0,0]
102102
" We are outside of any PHP markup. Complete HTML
@@ -803,7 +803,7 @@ function! phpcomplete#CompleteClassName(base, kinds, current_namespace, imports)
803803
endif
804804
let relative_name = namespace_part.tag.name
805805
" match base without the namespace part for namespaced base but not namespaced tags, for tagfiles with old ctags
806-
if !has_key(tag, 'namespace') && index(kinds, tag.kind) != -1 && stridx(tag.name, base[len(namespace_part):]) == 0
806+
if !has_key(tag, 'namespace') && index(kinds, tag.kind) != -1 && stridx(tolower(tag.name), tolower(base[len(namespace_part):])) == 0
807807
call add(no_namespace_matches, {'word': leading_slash.relative_name, 'kind': tag.kind, 'menu': tag.filename, 'info': tag.filename })
808808
endif
809809
if has_key(tag, 'namespace') && index(kinds, tag.kind) != -1 && tag.namespace ==? namespace_for_class
@@ -1607,6 +1607,7 @@ function! phpcomplete#GetClassName(start_line, context, current_namespace, impor
16071607
for arg in args
16081608
if arg =~# object.'\(,\|$\)'
16091609
let classname_candidate = matchstr(arg, '\s*\zs'.class_name_pattern.'\ze\s\+'.object)
1610+
let [classname_candidate, class_candidate_namespace] = phpcomplete#ExpandClassName(classname_candidate, a:current_namespace, a:imports)
16101611
break
16111612
endif
16121613
endfor
@@ -1625,6 +1626,7 @@ function! phpcomplete#GetClassName(start_line, context, current_namespace, impor
16251626
for param in docblock.params
16261627
if param.name =~? object
16271628
let classname_candidate = matchstr(param.type, class_name_pattern.'\(\[\]\)\?')
1629+
let [classname_candidate, class_candidate_namespace] = phpcomplete#ExpandClassName(classname_candidate, a:current_namespace, a:imports)
16281630
break
16291631
endif
16301632
endfor
@@ -1934,7 +1936,7 @@ function! phpcomplete#GetClassContentsStructure(file_path, file_lines, class_nam
19341936
call search('{')
19351937
let endline = line('.')
19361938

1937-
let content = join(getline(cfline, endline),"\n")
1939+
let content = join(getline(cfline, endline), "\n")
19381940
" Catch extends
19391941
if content =~? 'extends'
19401942
let extends_class = matchstr(content, 'class\_s\+'.a:class_name.'\_s\+extends\_s\+\zs'.class_name_pattern.'\ze')

runtime/doc/editing.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*editing.txt* For Vim version 7.4. Last change: 2014 Aug 09
1+
*editing.txt* For Vim version 7.4. Last change: 2014 Sep 19
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -609,7 +609,10 @@ list of the current window.
609609
{not in Vi}
610610

611611
:[count]arga[dd] {name} .. *:arga* *:argadd* *E479*
612-
Add the {name}s to the argument list.
612+
:[count]arga[dd]
613+
Add the {name}s to the argument list. When {name} is
614+
omitted at the current buffer name to the argument
615+
list.
613616
If [count] is omitted, the {name}s are added just
614617
after the current entry in the argument list.
615618
Otherwise they are added after the [count]'th file.

runtime/doc/helphelp.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*helphelp.txt* For Vim version 7.4. Last change: 2012 Nov 28
1+
*helphelp.txt* For Vim version 7.4. Last change: 2014 Sep 19
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -97,7 +97,7 @@ Help on help files *helphelp*
9797
current file. See |help-translated|.
9898

9999
*:helpc* *:helpclose*
100-
:helpc[lose] Close one help window.
100+
:helpc[lose] Close one help window, if there is one.
101101

102102
*:helpg* *:helpgrep*
103103
:helpg[rep] {pattern}[@xx]

runtime/doc/index.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*index.txt* For Vim version 7.4. Last change: 2014 Mar 25
1+
*index.txt* For Vim version 7.4. Last change: 2014 Sep 19
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar

runtime/doc/spell.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*spell.txt* For Vim version 7.4. Last change: 2014 Jul 02
1+
*spell.txt* For Vim version 7.4. Last change: 2014 Sep 19
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar

runtime/doc/tags

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2248,6 +2248,8 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
22482248
:ha print.txt /*:ha*
22492249
:hardcopy print.txt /*:hardcopy*
22502250
:help helphelp.txt /*:help*
2251+
:helpc helphelp.txt /*:helpc*
2252+
:helpclose helphelp.txt /*:helpclose*
22512253
:helpf helphelp.txt /*:helpf*
22522254
:helpfind helphelp.txt /*:helpfind*
22532255
:helpg helphelp.txt /*:helpg*
@@ -7825,6 +7827,7 @@ spell-FLAG spell.txt /*spell-FLAG*
78257827
spell-FOL spell.txt /*spell-FOL*
78267828
spell-FORBIDDENWORD spell.txt /*spell-FORBIDDENWORD*
78277829
spell-HOME spell.txt /*spell-HOME*
7830+
spell-IGNOREEXTRA spell.txt /*spell-IGNOREEXTRA*
78287831
spell-KEEPCASE spell.txt /*spell-KEEPCASE*
78297832
spell-KEY spell.txt /*spell-KEY*
78307833
spell-LANG spell.txt /*spell-LANG*

runtime/doc/todo.txt

Lines changed: 23 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*todo.txt* For Vim version 7.4. Last change: 2014 Sep 09
1+
*todo.txt* For Vim version 7.4. Last change: 2014 Sep 19
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -61,42 +61,11 @@ Breaks test_eval. Inefficient, can we only compute y_width when needed?
6161
Problem that a previous silent ":throw" causes a following try/catch not to
6262
work. (ZyX, 2013 Sep 28)
6363

64-
Update for Romanian spell file. (Vanilla Ice, 2014 Aug 13)
65-
Still produces errors.
66-
Add flag to ignore fifth argument of SFX.
67-
Conversion from utf-8 to cp1250 can't be without errors.
68-
69-
Patch to remove ETO_IGNORELANGUAGE, it causes Chinese characters not to show
70-
up. (Paul Moore, 2014 Jul 30)
71-
Should it depend on the Windows version? Waiting for feedback.
72-
No longer needed after including DirectX patch?
73-
Related to issue 255?
74-
75-
Problem with linebreak, adds a test that fails. (Nazri Ramliy, 2014 Sep 6)
76-
7764
Patch to avoid problems with encoding conversion with diff.vim.
7865
(Yasuhiro Matsumoto, 2014 Sep 1.
66+
Depends on current language, language of file can be different.
7967

80-
Patch by Marcin Szamotulski to add count to :close (2014 Aug 10, update Aug
81-
14, Aug 30)
82-
Make ":1close" close the first window.
83-
Make ":+1close" close the next window.
84-
Make ":-1close" close the previous window.
85-
Can't easily close the help window, like ":pc" closes the preview window and
86-
":ccl" closes the quickfix window. Add ":hclose". (Chris Gaal)
87-
Patch for :helpclose, Christian Brabandt, 2010 Sep 6.
88-
89-
Patch to fix line formatting bug. (Christian Brabandt, 2014 Sep 7)
90-
91-
Patch to fix ml_get error. (Christian Brabandt, 2014 Sep 7)
92-
93-
Patch by Marcin Szamotulski to add +cmd to buffer commands.
94-
(2014 Aug 18)
95-
96-
Patch to fix encoding of arguments when setting 'encoding'. (Yasuhiro
97-
Matsumoto, 2014 Sep 4)
98-
99-
Patch to fix that system() with empty input fails. (Olaf Dabrunz, 2014 Aug 19)
68+
Patch for C/C++ syntax string handling. (Brian Bi, 2014 Sep 13)
10069

10170
When using a visual selection of multiple words and doing CTRL-W_] it jumps to
10271
the tag matching the word under the cursor, not the selected text.
@@ -105,6 +74,9 @@ Patch by Christian, 2014 Aug 8.
10574

10675
Completion for :buf does not use 'wildignorecase'. (Akshay H, 2014 May 31)
10776

77+
'backupcopy' should be global-local, so that some files can be written in a
78+
different way. Patch by Christian, 2014 Sep 17.
79+
10880
Patch to handle list with some items locked. (ZyX, 2014 Aug 17)
10981
Prefer the second solution.
11082

@@ -113,6 +85,13 @@ Issue 252. Patch by Christian, 2014 Aug 26.
11385
":cd C:\Windows\System32\drivers\etc*" does not work, even though the
11486
directory exists. (Sergio Gallelli, 2013 Dec 29)
11587

88+
Patch by Marcin Szamotulski to add count to :close (2014 Aug 10, update Aug
89+
14, Aug 30)
90+
Make ":1close" close the first window.
91+
Make ":+1close" close the next window.
92+
Make ":-1close" close the previous window.
93+
Doesn't look right, asked for updates.
94+
11695
Patch to add a special key name for K_CURSORHOLD. (Hirohito Higashi, 2014 Aug
11796
10)
11897

@@ -129,18 +108,26 @@ inconsistent with the documentation.
129108
MS-Windows: Crash opening very long file name starting with "\\".
130109
(Christian Brock, 2012 Jun 29)
131110

111+
ml_updatechunk() is slow when retrying for another encoding. (John Little,
112+
2014 Sep 11)
113+
132114
Syntax highlighting slow (hangs) in SASS file. (Niek Bosch, 2013 Aug 21)
133115

134116
Patch to allow for a different icon on MS-Windows. (Yasuhiro Matsumoto, 2014
135117
Sep 7).
136118

137119
Adding "~" to 'cdpath' doesn't work for completion? (Davido, 2013 Aug 19)
138120

121+
Patch to make closed folds line up. (Charles Campbell, 2014 Sep 12)
122+
139123
"hi link" does not respect groups with GUI settings only. (Mark Lodato, 2014
140124
Jun 8)
141125

142126
No error for missing endwhile. (ZyX, 2014 Mar 20)
143127

128+
start_global_changes() plus end_global_changes() causes problem for
129+
clip_unnamed_plus. (Jason Pleau, 2014 Sep 12)
130+
144131
Patch to add :arglocal and :arglists. (Marcin Szamotulski, 2014 Aug 6)
145132

146133
PHP syntax is extremely slow. (Anhad Jai Singh, 2014 Jan 19)
@@ -238,7 +225,8 @@ Patch to support sorting on floating point number. (Alex Jakushev, 2010 Oct
238225

239226
Patch to support expression argument to sort() instead of a function name.
240227
Yasuhiro Matsumoto, 2013 May 31.
241-
Or should we add a more general mechanism, like lambda functions?
228+
Or should we add a more general mechanism, like a lambda() function?
229+
Patch by Yasuhiro Matsumoto, 2014 Sep 16.
242230

243231
VMS: Select() doesn't work properly, typing ESC may hang Vim. Use sys$qiow
244232
instead. (Samuel Ferencik, 2013 Sep 28)

runtime/indent/ada.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ function s:StatementIndent( current_indent, prev_lnum )
148148
" Get previous non-blank/non-comment-only line
149149
while 1
150150
let line = substitute( getline(lnum), g:ada#Comment, '', '' )
151-
151+
152152
if line !~ '^\s*$' && line !~ '^\s*#'
153153
break
154154
endif

runtime/indent/vim.vim

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
" Vim indent file
22
" Language: Vim script
33
" Maintainer: Bram Moolenaar <Bram@vim.org>
4-
" Last Change: 2012 Aug 02
4+
" Last Change: 2014 Sep 19
55

66
" Only load this indent file when no other was loaded.
77
if exists("b:did_indent")
@@ -37,7 +37,8 @@ function GetVimIndentIntern()
3737

3838
" If the current line doesn't start with '\' and below a line that starts
3939
" with '\', use the indent of the line above it.
40-
if getline(v:lnum) !~ '^\s*\\'
40+
let cur_text = getline(v:lnum)
41+
if cur_text !~ '^\s*\\'
4142
while lnum > 0 && getline(lnum) =~ '^\s*\\'
4243
let lnum = lnum - 1
4344
endwhile
@@ -47,37 +48,39 @@ function GetVimIndentIntern()
4748
if lnum == 0
4849
return 0
4950
endif
51+
let prev_text = getline(lnum)
5052

5153
" Add a 'shiftwidth' after :if, :while, :try, :catch, :finally, :function
5254
" and :else. Add it three times for a line that starts with '\' after
5355
" a line that doesn't (or g:vim_indent_cont if it exists).
5456
let ind = indent(lnum)
55-
if getline(v:lnum) =~ '^\s*\\' && v:lnum > 1 && getline(lnum) !~ '^\s*\\'
57+
if cur_text =~ '^\s*\\' && v:lnum > 1 && prev_text !~ '^\s*\\'
5658
if exists("g:vim_indent_cont")
5759
let ind = ind + g:vim_indent_cont
5860
else
5961
let ind = ind + &sw * 3
6062
endif
61-
elseif getline(lnum) =~ '^\s*aug\%[roup]' && getline(lnum) !~ '^\s*aug\%[roup]\s*!\=\s\+END'
63+
elseif prev_text =~ '^\s*aug\%[roup]' && prev_text !~ '^\s*aug\%[roup]\s*!\=\s\+END'
6264
let ind = ind + &sw
6365
else
64-
let line = getline(lnum)
65-
let i = match(line, '\(^\||\)\s*\(if\|wh\%[ile]\|for\|try\|cat\%[ch]\|fina\%[lly]\|fu\%[nction]\|el\%[seif]\)\>')
66-
if i >= 0
67-
let ind += &sw
68-
if strpart(line, i, 1) == '|' && has('syntax_items')
69-
\ && synIDattr(synID(lnum, i, 1), "name") =~ '\(Comment\|String\)$'
70-
let ind -= &sw
66+
" A line starting with :au does not increment/decrement indent.
67+
if prev_text !~ '^\s*au\%[tocmd]'
68+
let i = match(prev_text, '\(^\||\)\s*\(if\|wh\%[ile]\|for\|try\|cat\%[ch]\|fina\%[lly]\|fu\%[nction]\|el\%[seif]\)\>')
69+
if i >= 0
70+
let ind += &sw
71+
if strpart(prev_text, i, 1) == '|' && has('syntax_items')
72+
\ && synIDattr(synID(lnum, i, 1), "name") =~ '\(Comment\|String\)$'
73+
let ind -= &sw
74+
endif
7175
endif
7276
endif
7377
endif
7478

7579
" If the previous line contains an "end" after a pipe, but not in an ":au"
7680
" command. And not when there is a backslash before the pipe.
7781
" And when syntax HL is enabled avoid a match inside a string.
78-
let line = getline(lnum)
79-
let i = match(line, '[^\\]|\s*\(ene\@!\)')
80-
if i > 0 && line !~ '^\s*au\%[tocmd]'
82+
let i = match(prev_text, '[^\\]|\s*\(ene\@!\)')
83+
if i > 0 && prev_text !~ '^\s*au\%[tocmd]'
8184
if !has('syntax_items') || synIDattr(synID(lnum, i + 2, 1), "name") !~ '\(Comment\|String\)$'
8285
let ind = ind - &sw
8386
endif
@@ -86,7 +89,7 @@ function GetVimIndentIntern()
8689

8790
" Subtract a 'shiftwidth' on a :endif, :endwhile, :catch, :finally, :endtry,
8891
" :endfun, :else and :augroup END.
89-
if getline(v:lnum) =~ '^\s*\(ene\@!\|cat\|fina\|el\|aug\%[roup]\s*!\=\s\+END\)'
92+
if cur_text =~ '^\s*\(ene\@!\|cat\|fina\|el\|aug\%[roup]\s*!\=\s\+END\)'
9093
let ind = ind - &sw
9194
endif
9295

0 commit comments

Comments
 (0)