separate highlight selection from other selections
will make it easier to manage other selections externally
This commit is contained in:
@@ -11,10 +11,8 @@ from settings import Settings
|
||||
|
||||
|
||||
class HighlightSelection(Highlight):
|
||||
|
||||
def __init__(self, start_byte: int, end_byte: int):
|
||||
self.start_byte = start_byte
|
||||
self.end_byte = end_byte
|
||||
start_byte = 0
|
||||
end_byte = 0
|
||||
|
||||
def set_start(self, start_byte):
|
||||
self.start_byte = start_byte
|
||||
@@ -33,9 +31,9 @@ class HighlightSelection(Highlight):
|
||||
start = 0
|
||||
|
||||
if line.includes_byte(end):
|
||||
length = end - line.byte_offset() - start
|
||||
length = end - line.byte_offset() - start
|
||||
else:
|
||||
length = Settings.max_line_length() -start
|
||||
length = Settings.max_line_length() - start
|
||||
|
||||
return [HighlightedRange(start, length, brush=QBrush(QColor(156, 215, 255)), pen=Qt.PenStyle.NoPen)]
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user