Changeset 6035008


Ignore:
Timestamp:
Sep 30, 2009, 1:02:36 AM (14 years ago)
Author:
David Benjamin <davidben@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:
a3a9eb7
Parents:
76e0e4a
git-author:
David Benjamin <davidben@mit.edu> (09/23/09 00:44:40)
git-committer:
David Benjamin <davidben@mit.edu> (09/30/09 01:02:36)
Message:
Drop start argument to complete_filter_expr

Use context slicing instead. For now, the private functions will retain
the index for efficiency and to avoid complexity. They're private, so we
don't need to conform to any interface.

Signed-off-by: David Benjamin <davidben@mit.edu>
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perl/lib/BarnOwl/Complete/Client.pm

    r76e0e4a r6035008  
    151151sub complete_filter_expr {
    152152    my $ctx = shift;
    153     my $start = shift;
     153
    154154    my @completions = ();
    155     _complete_filter_expr($ctx, $start, \@completions);
     155    _complete_filter_expr($ctx, 0, \@completions);
    156156    # Get rid of duplicates and sort
    157157    my %hash = ();
     
    202202            # We pass stop_at_nonflag, so we can rewind to the start
    203203            my $idx = $ctx->word - $arg;
    204             return complete_filter_expr($ctx, $idx);
     204            $ctx = $ctx->shift_words($idx);
     205            return complete_filter_expr($ctx);
    205206        },
    206207        stop_at_nonflag => 1
     
    217218    }
    218219    if ($ctx->words->[1] eq "-d") {
    219         return complete_filter_expr($ctx, 2);
     220        $ctx = $ctx->shift_words(2);
     221        return complete_filter_expr($ctx);
    220222    }
    221223    if ($ctx->words->[1] eq "-s") {
Note: See TracChangeset for help on using the changeset viewer.