If in dictionary completion, return the dict that should be used
(cursor_offset: int, line: str)
| 96 | |
| 97 | |
| 98 | def current_dict(cursor_offset: int, line: str) -> LinePart | None: |
| 99 | """If in dictionary completion, return the dict that should be used""" |
| 100 | for m in _current_dict_re.finditer(line): |
| 101 | if m.start(2) <= cursor_offset <= m.end(2): |
| 102 | return LinePart(m.start(1), m.end(1), m.group(1)) |
| 103 | return None |
| 104 | |
| 105 | |
| 106 | _current_string_re = LazyReCompile( |