summaryrefslogtreecommitdiff
path: root/lib/abbrev.pl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/abbrev.pl')
-rw-r--r--lib/abbrev.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/abbrev.pl b/lib/abbrev.pl
index c233d4af7e..62975e66f3 100644
--- a/lib/abbrev.pl
+++ b/lib/abbrev.pl
@@ -17,7 +17,7 @@ sub main'abbrev {
$len = 1;
foreach $cmp (@cmp) {
next if $cmp eq $name;
- while (substr($cmp,0,$len) eq $abbrev) {
+ while (@extra && substr($cmp,0,$len) eq $abbrev) {
$abbrev .= shift(@extra);
++$len;
}