Skip to content

Commit

Permalink
Match full path only if search text includes slash
Browse files Browse the repository at this point in the history
  • Loading branch information
ku1ik committed Jun 1, 2010
1 parent 5a2be39 commit 2e00ed2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ruby/command-t/match.c
Expand Up @@ -48,6 +48,13 @@ VALUE CommandTMatch_initialize(int argc, VALUE *argv, VALUE self)
int dot_search = 0; // true if abbrev definitely matches a dot-file
int pending_dot_search = 0; // true if abbrev might match a dot-file

if (strchr(abbrev_p, '/') == NULL) {
char *filename = strrchr(str_p, '/');
if (filename != NULL) {
cursor = filename + 1 - str_p;
}
}

rb_iv_set(self, "@str", str);
VALUE offsets = rb_ary_new();

Expand Down

0 comments on commit 2e00ed2

Please sign in to comment.