diff options
author | Jesse Luehrs <doy@tozt.net> | 2013-07-01 21:25:08 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2013-07-01 21:25:08 -0400 |
commit | a5d47b1ad425985a3bb7b08532207e89110f9daa (patch) | |
tree | 2384c14dde0b895991ca9310c6dc84032ce82153 /lib | |
parent | 591852758c446052f9081585b0fdea817ceff6a3 (diff) | |
download | reply-a5d47b1ad425985a3bb7b08532207e89110f9daa.tar.gz reply-a5d47b1ad425985a3bb7b08532207e89110f9daa.zip |
allow tab completing after "$foo->"
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Reply/Plugin/Autocomplete/Methods.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Reply/Plugin/Autocomplete/Methods.pm b/lib/Reply/Plugin/Autocomplete/Methods.pm index 19302ce..cd54d31 100644 --- a/lib/Reply/Plugin/Autocomplete/Methods.pm +++ b/lib/Reply/Plugin/Autocomplete/Methods.pm @@ -50,7 +50,9 @@ sub tab_handler { my ($line) = @_; my ($invocant, $method) = $line =~ /((?:\$\s*)?[A-Z_a-z][0-9A-Z_a-z:]*)->([A-Z_a-z][0-9A-Z_a-z]*)?$/; - return unless $method; + return unless $invocant; + + $method = '' unless defined $method; my $package; if ($invocant =~ /^\$/) { |