add missing file selectionPos

forgot to add it in one of the previous commits
This commit is contained in:
2025-03-25 17:04:37 +01:00
parent c19cdf6f41
commit 51c02b3d55

View 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)