add missing file selectionPos
forgot to add it in one of the previous commits
This commit is contained in:
11
src/ui/bigtext/selectionPos.py
Normal file
11
src/ui/bigtext/selectionPos.py
Normal file
@@ -0,0 +1,11 @@
|
||||
class SelectionPos:
|
||||
def __init__(self, index: int, is_in_left_half: bool, num_bytes_of_char: int):
|
||||
self.index = index
|
||||
self.is_in_left_half = is_in_left_half
|
||||
self.num_bytes_of_char = num_bytes_of_char
|
||||
|
||||
def __repr__(self):
|
||||
return f"{self.index}{'🞀' if self.is_in_left_half else '🞂'}({self.num_bytes_of_char})"
|
||||
|
||||
def pos(self):
|
||||
return self.index + (0 if self.is_in_left_half else self.num_bytes_of_char)
|
||||
Reference in New Issue
Block a user