Show More
@@ -168,6 +168,12 b' MATCHES_LIMIT = 500' | |||||
168 |
|
168 | |||
169 | _deprecation_readline_sentinel = object() |
|
169 | _deprecation_readline_sentinel = object() | |
170 |
|
170 | |||
|
171 | names = [] | |||
|
172 | for c in range(0,0x10FFFF + 1): | |||
|
173 | try: | |||
|
174 | names.append(unicodedata.name(char(c))) | |||
|
175 | except ValueError: | |||
|
176 | pass | |||
171 |
|
177 | |||
172 | class ProvisionalCompleterWarning(FutureWarning): |
|
178 | class ProvisionalCompleterWarning(FutureWarning): | |
173 | """ |
|
179 | """ | |
@@ -2065,20 +2071,12 b' class IPCompleter(Completer):' | |||||
2065 | return text, _matches, origins, completions |
|
2071 | return text, _matches, origins, completions | |
2066 |
|
2072 | |||
2067 | def fwd_unicode_match(self, text:str) -> Tuple[str, list]: |
|
2073 | def fwd_unicode_match(self, text:str) -> Tuple[str, list]: | |
2068 | # initial code based on latex_matches() method |
|
2074 | # initial code based on latex_matches() method | |
2069 | slashpos = text.rfind('\\') |
|
2075 | slashpos = text.rfind('\\') | |
2070 | # if text starts with slash |
|
2076 | # if text starts with slash | |
2071 | if slashpos > -1: |
|
2077 | if slashpos > -1: | |
2072 | s = text[slashpos:] |
|
2078 | s = text[slashpos+1:] | |
2073 | # check if s is already a unicode, maybe this is not necessary |
|
2079 | return s, [x for x in names if x.startswith(s)] | |
2074 | try unicodedata.lookup(s): |
|
|||
2075 | # need to find the unicodes equivalent list to latex_symbols |
|
|||
2076 | return s, [latex_symbols[s]] |
|
|||
2077 | except KeyError: |
|
|||
2078 | return u'', [] |
|
|||
2079 | # need to find the unicode equivalent to latex_symbols and do something similar |
|
|||
2080 | matches = [k for k in latex_symbols if k.startswith(s)] |
|
|||
2081 | return s, matches |
|
|||
2082 |
|
2080 | |||
2083 | # if text does not start with slash |
|
2081 | # if text does not start with slash | |
2084 | else: |
|
2082 | else: |
General Comments 0
You need to be logged in to leave comments.
Login now