Changeset c4efb46 for perl


Ignore:
Timestamp:
Jul 28, 2009, 11:20:30 PM (15 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
19cc7b00
Parents:
216b1d0
Message:
Completion: Fix a min/max confusion.

This could cause completion to insert a completion in some situations
even if it was not unique.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perl/lib/BarnOwl/Completion.pm

    rf987504 rc4efb46  
    1818                        point_move replace_region);
    1919
    20 use List::Util qw(max first);
     20use List::Util qw(min first);
    2121
    2222our %completers = ();
     
    7676sub common_prefix {
    7777    my @words = @_;
    78     my $len   = max(map {length($_)} @words);
     78    my $len   = min(map {length($_)} @words);
    7979    my $pfx = '';
    8080    for my $i (1..$len) {
Note: See TracChangeset for help on using the changeset viewer.