##// END OF EJS Templates
Make unicode backslach completion fuzzy and case insensitive...
Matthias Bussonnier -
Show More
@@ -2222,12 +2222,22 b' class IPCompleter(Completer):'
2222 # initialized, and it takes a user-noticeable amount of time to
2222 # initialized, and it takes a user-noticeable amount of time to
2223 # initialize it, so we don't want to initialize it unless we're
2223 # initialize it, so we don't want to initialize it unless we're
2224 # actually going to use it.
2224 # actually going to use it.
2225 s = text[slashpos+1:]
2225 s = text[slashpos + 1 :]
2226 candidates = [x for x in self.unicode_names if x.startswith(s)]
2226 sup = s.upper()
2227 candidates = [x for x in self.unicode_names if x.startswith(sup)]
2227 if candidates:
2228 if candidates:
2228 return s, candidates
2229 return s, candidates
2229 else:
2230 candidates = [x for x in self.unicode_names if sup in x]
2230 return '', ()
2231 if candidates:
2232 return s, candidates
2233 splitsup = sup.split(" ")
2234 candidates = [
2235 x for x in self.unicode_names if all(u in x for u in splitsup)
2236 ]
2237 if candidates:
2238 return s, candidates
2239
2240 return "", ()
2231
2241
2232 # if text does not start with slash
2242 # if text does not start with slash
2233 else:
2243 else:
General Comments 0
You need to be logged in to leave comments. Login now