compute between bytes and chars to get correct clipboard copy
This commit is contained in:
@@ -168,8 +168,8 @@ class InnerBigText(QWidget):
|
||||
column_in_line = self.x_pos_to_column(e.pos().x()) + self._left_offset
|
||||
char_in_line = min(column_in_line, line.length())
|
||||
# print("%s in line %s" % (char_in_line, line_number))
|
||||
|
||||
current_byte = line.byte_offset() + char_in_line
|
||||
byte_in_line = line.char_index_to_byte(char_in_line)
|
||||
current_byte = line.byte_offset() + byte_in_line
|
||||
# print("%s + %s = %s" % (line.byte_offset(), char_in_line, current_byte))
|
||||
else:
|
||||
current_byte = self.model.byte_count()
|
||||
|
||||
Reference in New Issue
Block a user