fix crash when double clicking behind the last char
This commit is contained in:
@@ -312,10 +312,10 @@ class InnerBigText(QWidget):
|
||||
char_in_line = line.column_to_char(column_in_line)
|
||||
# print("%s in line %s" % (char_in_line, line_number))
|
||||
byte_in_line = line.char_index_to_byte(char_in_line)
|
||||
current_byte = line.byte_offset() + byte_in_line
|
||||
current_byte = line.byte_offset() + byte_in_line - 1
|
||||
# print("%s + %s = %s" % (line.byte_offset(), char_in_line, current_byte))
|
||||
else:
|
||||
current_byte = self.model.byte_count()
|
||||
current_byte = self.model.byte_count() - 1
|
||||
return current_byte
|
||||
|
||||
def _has_selection(self):
|
||||
|
||||
Reference in New Issue
Block a user