From 51c02b3d55267bc66b4f40775fdd0c933fba4095 Mon Sep 17 00:00:00 2001 From: Andreas Huber Date: Tue, 25 Mar 2025 17:04:37 +0100 Subject: [PATCH] add missing file selectionPos forgot to add it in one of the previous commits --- src/ui/bigtext/selectionPos.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/ui/bigtext/selectionPos.py diff --git a/src/ui/bigtext/selectionPos.py b/src/ui/bigtext/selectionPos.py new file mode 100644 index 0000000..58258a0 --- /dev/null +++ b/src/ui/bigtext/selectionPos.py @@ -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)