Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Match full path only if search text includes slash

  • Loading branch information...
commit 2e00ed2f68a5a2ae6a6d9725ffb7dfde6c858d84 1 parent 5a2be39
@sickill authored
Showing with 7 additions and 0 deletions.
  1. +7 −0 ruby/command-t/match.c
View
7 ruby/command-t/match.c
@@ -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();
Please sign in to comment.
Something went wrong with that request. Please try again.