add the first plugins

This commit is contained in:
2021-11-26 18:19:57 +01:00
parent 1ea10e2933
commit 0e27cb2b26
13 changed files with 543 additions and 197 deletions

View File

@@ -85,7 +85,9 @@ class LogFileModel:
return "", -1, -1
offset_in_line = byte_offset - line.byte_offset()
current_char = line.line()[line.byte_index_to_char_index(offset_in_line)]
char_index = line.byte_index_to_char_index(offset_in_line)
# todo char_index may be out of range
current_char = line.line()[char_index]
if not self._is_word_char(current_char):
return current_char, byte_offset, byte_offset + 1
start_in_line = line.byte_index_to_char_index(byte_offset - line.byte_offset())