Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions plugin/phpfolding.vim
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ function! s:PHPCustomFolds() " {{{
call s:PHPFoldPureBlock('function', s:FOLD_WITH_PHPDOC)

" Fold class properties with PhpDoc (var $foo = NULL;)
call s:PHPFoldProperties('^\s*var\s\$', ";", s:FOLD_WITH_PHPDOC, 1, 1)
call s:PHPFoldProperties('^\s*\(\(private\)\|\(public\)\|\(protected\)\|\(var\)\)\s\$', ";", s:FOLD_WITH_PHPDOC, 1, 1)

" Fold class without PhpDoc (class foo {})
call s:PHPFoldPureBlock('^\s*\(abstract\s*\)\?class', s:FOLD_WITH_PHPDOC)
Expand Down Expand Up @@ -380,9 +380,9 @@ function! s:FindPureBlockStart(startPattern) " {{{
" This function can match the line its on *again* if the cursor was
" restored.. hence we search twice if needed..
let currentLine = line('.')
let line = search(a:startPattern . '.*\%[\n].*\%[\n].*{', 'bW')
let line = search(a:startPattern . '.*\(\%[\n].*\)\{,10\}{', 'bW')
if currentLine == line
let line = search(a:startPattern . '.*\%[\n].*\%[\n].*{', 'bW')
let line = search(a:startPattern . '.*\(\%[\n].*\)\{,10\}{', 'bW')
endif
return line
endfunction
Expand Down