From 62873e077363d0ea19351df5d88277af3589f39e Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Tue, 2 Jul 2013 02:47:17 -0400 Subject: clean up some more tab completion stuff --- lib/Reply/Plugin/Autocomplete/Keywords.pm | 1 + lib/Reply/Plugin/Autocomplete/Packages.pm | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/Reply/Plugin/Autocomplete/Keywords.pm b/lib/Reply/Plugin/Autocomplete/Keywords.pm index 04b6a17..9e22ae4 100644 --- a/lib/Reply/Plugin/Autocomplete/Keywords.pm +++ b/lib/Reply/Plugin/Autocomplete/Keywords.pm @@ -26,6 +26,7 @@ sub tab_handler { my ($before, $last_word) = $line =~ /(.*?)(\w+)$/; return unless $last_word; return if $before =~ /::$/; # Package::function call + return if $before =~ /->\s*$/; # method call return if $before =~ /[\$\@\%\&\*]\s*$/; my $re = qr/^\Q$last_word/; diff --git a/lib/Reply/Plugin/Autocomplete/Packages.pm b/lib/Reply/Plugin/Autocomplete/Packages.pm index 6e6037d..c0a81a9 100644 --- a/lib/Reply/Plugin/Autocomplete/Packages.pm +++ b/lib/Reply/Plugin/Autocomplete/Packages.pm @@ -27,6 +27,7 @@ sub tab_handler { # $module_name_rx does not permit trailing :: my ($before, $package_fragment) = $line =~ /(.*?)(${module_name_rx}:?:?)$/; return unless $package_fragment; + return if $before =~ /->\s*$/; # method call return if $before =~ /[\$\@\%\&\*]\s*$/; my $file_fragment = $package_fragment; -- cgit v1.2.3-54-g00ecf