summaryrefslogtreecommitdiffstats
path: root/runtime/autoload/phpcomplete.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2015-07-10 19:31:35 +0200
committerBram Moolenaar <Bram@vim.org>2015-07-10 19:31:35 +0200
commit86ae720d7567fcbbe40f00cf136c797953f21038 (patch)
tree8a0ce9b2505cfd3bec6df7ef71cb555098d0de68 /runtime/autoload/phpcomplete.vim
parent694cac7a352ea66827cd94ed1ccbc2fc5655e9cc (diff)
Updated runtime files.
Diffstat (limited to 'runtime/autoload/phpcomplete.vim')
-rw-r--r--runtime/autoload/phpcomplete.vim16
1 files changed, 8 insertions, 8 deletions
diff --git a/runtime/autoload/phpcomplete.vim b/runtime/autoload/phpcomplete.vim
index 6dcddfd43e..ec48251d85 100644
--- a/runtime/autoload/phpcomplete.vim
+++ b/runtime/autoload/phpcomplete.vim
@@ -3,7 +3,7 @@
" Maintainer: Dávid Szabó ( complex857 AT gmail DOT com )
" Previous Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
" URL: https://github.com/shawncplus/phpcomplete.vim
-" Last Change: 2015 Apr 02
+" Last Change: 2015 Jul 03
"
" OPTIONS:
"
@@ -1659,7 +1659,7 @@ function! phpcomplete#GetClassName(start_line, context, current_namespace, impor
" function declaration line
if line =~? 'function\(\s\+'.function_name_pattern.'\)\?\s*('
- let function_lines = join(reverse(lines), " ")
+ let function_lines = join(reverse(copy(lines)), " ")
" search for type hinted arguments
if function_lines =~? 'function\(\s\+'.function_name_pattern.'\)\?\s*(.\{-}'.class_name_pattern.'\s\+'.object && !object_is_array
let f_args = matchstr(function_lines, '\cfunction\(\s\+'.function_name_pattern.'\)\?\s*(\zs.\{-}\ze)')
@@ -1700,7 +1700,7 @@ function! phpcomplete#GetClassName(start_line, context, current_namespace, impor
" try to find the next non-comment or string ";" char
let start_col = match(line, '^\s*'.object.'\C\s*=\zs&\?\s\+\(clone\)\?\s*'.variable_name_pattern)
- let filelines = reverse(lines)
+ let filelines = reverse(copy(lines))
let [pos, char] = s:getNextCharWithPos(filelines, [a:start_line - i - 1, start_col])
let chars_read = 1
let last_pos = pos
@@ -1876,7 +1876,7 @@ function! phpcomplete#GetClassLocation(classname, namespace) " {{{
let i = 1
while i < line('.')
let line = getline(line('.')-i)
- if line =~? '^\s*\(abstract\s\+\|final\s\+\)*\s*\(class\|interface\|trait\)\s*'.a:classname.'\(\s\+\|$\)' && tolower(current_namespace) == search_namespace
+ if line =~? '^\s*\(abstract\s\+\|final\s\+\)*\s*\(class\|interface\|trait\)\s*'.a:classname.'\(\s\+\|$\|{\)' && tolower(current_namespace) == search_namespace
return expand('%:p')
else
let i += 1
@@ -2123,7 +2123,7 @@ function! phpcomplete#GetClassContentsStructure(file_path, file_lines, class_nam
elseif classlocation != '' && filereadable(classlocation)
let full_file_path = fnamemodify(classlocation, ':p')
let result += phpcomplete#GetClassContentsStructure(full_file_path, readfile(full_file_path), class)
- elseif tolower(current_namespace) == tolower(namespace)
+ elseif tolower(current_namespace) == tolower(namespace) && match(join(a:file_lines, "\n"), '\c\(class\|interface\|trait\)\_s\+'.class.'\(\>\|$\)') != -1
" try to find the declaration in the same file.
let result += phpcomplete#GetClassContentsStructure(full_file_path, a:file_lines, class)
endif
@@ -2407,8 +2407,8 @@ function! phpcomplete#GetCurrentNameSpace(file_lines) " {{{
while i < file_length
let line = file_lines[i]
- if line =~? '^\s*namespace\s*'.namespace_name_pattern
- let current_namespace = matchstr(line, '\c^\s*namespace\s*\zs'.namespace_name_pattern.'\ze')
+ if line =~? '^\(<?php\)\?\s*namespace\s*'.namespace_name_pattern
+ let current_namespace = matchstr(line, '\c^\(<?php\)\?\s*namespace\s*\zs'.namespace_name_pattern.'\ze')
break
endif
@@ -2571,7 +2571,7 @@ endfunction
function! phpcomplete#ExpandClassName(classname, current_namespace, imports) " {{{
" if there's an imported class, just use that class's information
- if has_key(a:imports, a:classname) && (a:imports[a:classname].kind == 'c' || a:imports[a:classname].kind == 'i')
+ if has_key(a:imports, a:classname) && (a:imports[a:classname].kind == 'c' || a:imports[a:classname].kind == 'i' || a:imports[a:classname].kind == 't')
let namespace = has_key(a:imports[a:classname], 'namespace') ? a:imports[a:classname].namespace : ''
return [a:imports[a:classname].name, namespace]
endif
6'>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 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803
%!PS-Adobe-3.0 EPSF-3.0
%%For: 
%%Title: 
%%Creator: Scribus1.4.2
%%Pages: 1
%%BoundingBox: 0 0 282 282
%%HiResBoundingBox: 0 0 282 282
%%LanguageLevel: 3
%%EndComments
%%BeginProlog
/Scribusdict 100 dict def
Scribusdict begin
/sp {showpage} bind def
/oldsetgray /setgray load def
/cmyk {setcmykcolor} def
/m {moveto} bind def
/l {lineto} bind def
/li {lineto} bind def
/cu {curveto} bind def
/cl {closepath} bind def
/gs {gsave} bind def
/gr {grestore} bind def
/tr {translate} bind def
/ro {rotate} bind def
/sh {show} bind def
/shg {setcmykcolor moveto glyphshow} def
/shgsp {moveto glyphshow} def
/sc {scale} bind def
/se {selectfont} bind def
/sf {setfont} bind def
/sw {setlinewidth} bind def
/f  {findfont} bind def
/fi {fill} bind def
/st {stroke} bind def
/shgf {gs dup scale begin cvx exec fill end gr} bind def
/shgs {gs dup 1 exch div currentlinewidth mul sw dup scale
       begin cvx exec st end gr} bind def
/bEPS {
    /b4_Inc_state save def
    /dict_count countdictstack def
    /op_count count 1 sub def
    userdict begin
    /showpage { } def
    0 setgray 0 setlinecap
    1 setlinewidth 0 setlinejoin
    10 setmiterlimit [ ] 0 setdash newpath
    /languagelevel where
    {pop languagelevel
    1 ne
    {false setstrokeadjust false setoverprint
    } if } if } bind def
/eEPS { count op_count sub {pop} repeat
    countdictstack dict_count sub {end} repeat
    b4_Inc_state restore } bind def
    end
%%EndProlog
%%BeginSetup
%%EndSetup
%%Page: 1 1
%%PageOrientation: Portrait
Scribusdict begin
save
/DeviceCMYK setcolorspace
0 0 tr
0 0 m
282 0 li
282 282 li
0 282 li cl clip newpath
gs
0.708406 281.428 m
281.58 281.428 li
281.58 0.556 li
0.708406 0.556 li
0.708406 281.428 li
cl
eoclip newpath
gs
0.216 sw
0 setlinecap
0 setlinejoin
[] 0 setdash
0.816406 281.32 tr
280.656 -138.888 m
138.888 0 li
0 -141.696 li
138.888 -280.656 li
280.656 -138.888 li
cl
0 0 0 1 cmyk eofill
280.656 -138.888 m
138.888 0 li
0 -141.696 li
138.888 -280.656 li
280.656 -138.888 li
cl
0 0 0 1 cmyk st
gr
gs
0.216 sw
0 setlinecap
0 setlinejoin
[] 0 setdash
139.704 142.432 tr
127.584 0 m
136.08 0 li
0 -136.08 li
0 -127.584 li
127.584 0 li
cl
0.6 0 0.4 0.580392 cmyk eofill
127.584 0 m
136.08 0 li
0 -136.08 li
0 -127.584 li
127.584 0 li
cl
0 0 0 1 cmyk st
gr
gs
0.216 sw
0 setlinecap
0 setlinejoin
[] 0 setdash
6.50391 139.624 tr
0 0 m
8.49609 0 li
133.2 -124.776 li
133.2 -133.272 li
0 0 li
cl
0.6 0 0.4 0.509804 cmyk eofill
0 0 m
8.49609 0 li
133.2 -124.776 li
133.2 -133.272 li
0 0 li
cl
0 0 0 1 cmyk st
gr
gs
0.216 sw
0 setlinecap
0 setlinejoin
[] 0 setdash
6.50391 275.632 tr
133.2 -8.42384 m
133.2 0 li
0 -136.008 li
8.49609 -136.008 li
133.2 -8.42384 li
cl
0.6 0 0.4 0 cmyk eofill
133.2 -8.42384 m
133.2 0 li
0 -136.008 li
8.49609 -136.008 li
133.2 -8.42384 li
cl
0 0 0 1 cmyk st
gr
gs
0.216 sw
0 setlinecap
0 setlinejoin
[] 0 setdash
139.704 275.632 tr
0 0 m
0 -8.42384 li
127.584 -133.2 li
136.08 -133.2 li
0 0 li
cl
0.729412 0 0.988235 0 cmyk eofill
0 0 m
0 -8.42384 li
127.584 -133.2 li
136.08 -133.2 li
0 0 li
cl
0 0 0 1 cmyk st
gr
gs
0.216 sw
0 setlinecap
0 setlinejoin
[] 0 setdash
15 267.208 tr
124.704 -252.36 m
252.288 -124.776 li
124.704 0 li
0 -127.584 li
124.704 -252.36 li
cl
0.6 0 0.4 0.4 cmyk eofill
124.704 -252.36 m
252.288 -124.776 li
124.704 0 li
0 -127.584 li
124.704 -252.36 li
cl
0 0 0 1 cmyk st
gr
gs
0.216 sw
0 setlinecap
0 setlinejoin
[] 0 setdash
18.8164 270.016 tr
147.384 -31.1758 m
155.88 -39.7431 li
97.2716 -99.2156 li
97.2716 -39.7431 li
102.96 -39.7431 li
111.456 -31.1758 li
111.456 -8.5674 li
102.96 0 li
8.4951 0 li
0 -8.5674 li
0 -31.17