the un-dotted word just before or under the cursor
(cursor_offset: int, line: str)
| 251 | |
| 252 | |
| 253 | def current_single_word(cursor_offset: int, line: str) -> LinePart | None: |
| 254 | """the un-dotted word just before or under the cursor""" |
| 255 | for m in _current_single_word_re.finditer(line): |
| 256 | if m.start(1) <= cursor_offset <= m.end(1): |
| 257 | return LinePart(m.start(1), m.end(1), m.group(1)) |
| 258 | return None |
| 259 | |
| 260 | |
| 261 | def current_dotted_attribute(cursor_offset: int, line: str) -> LinePart | None: |