From dda9d5e4e775164585ea003e61f6cc34b287d457 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Wed, 20 Nov 2024 11:47:17 -0500 Subject: [PATCH] Fixed an off by one error when marking text. --- .../commands/commands/copy_marked_to_clipboard.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fenrirscreenreader/commands/commands/copy_marked_to_clipboard.py b/src/fenrirscreenreader/commands/commands/copy_marked_to_clipboard.py index 2d616e09..ae21ffe1 100644 --- a/src/fenrirscreenreader/commands/commands/copy_marked_to_clipboard.py +++ b/src/fenrirscreenreader/commands/commands/copy_marked_to_clipboard.py @@ -31,7 +31,7 @@ class command(): if startY == endY: line = screenLines[startY] startX = min(startMark['x'], len(line)) - endX = min(endMark['x'], len(line)) + endX = min(endMark['x'], len(line)) + 1 return line[startX:endX] # Handle multi-line selection @@ -49,7 +49,7 @@ class command(): # Last line (from start to end mark) if endY > startY: lastLine = screenLines[endY] - endX = min(endMark['x'], len(lastLine)) + endX = min(endMark['x'], len(lastLine)) + 1 result.append(lastLine[:endX]) return '\n'.join(result)