summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2013-07-01 21:25:08 -0400
committerJesse Luehrs <doy@tozt.net>2013-07-01 21:25:08 -0400
commita5d47b1ad425985a3bb7b08532207e89110f9daa (patch)
tree2384c14dde0b895991ca9310c6dc84032ce82153
parent591852758c446052f9081585b0fdea817ceff6a3 (diff)
downloadreply-a5d47b1ad425985a3bb7b08532207e89110f9daa.tar.gz
reply-a5d47b1ad425985a3bb7b08532207e89110f9daa.zip
allow tab completing after "$foo->"
-rw-r--r--lib/Reply/Plugin/Autocomplete/Methods.pm4
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 =~ /^\$/) {