From 5b5536444d021288796b086f3fd4e92a0c47c8d1 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Sat, 7 Mar 2020 07:28:30 -0500 Subject: [PATCH] Improved rstrip for copy. --- .../commands/commands/copy_last_echo_to_clipboard.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/fenrirscreenreader/commands/commands/copy_last_echo_to_clipboard.py b/src/fenrirscreenreader/commands/commands/copy_last_echo_to_clipboard.py index 136cd1f2..238ae87b 100644 --- a/src/fenrirscreenreader/commands/commands/copy_last_echo_to_clipboard.py +++ b/src/fenrirscreenreader/commands/commands/copy_last_echo_to_clipboard.py @@ -18,7 +18,9 @@ class command(): return _('copies last presented text to the clipboard') def run(self): - lastEcho = self.env['runtime']['outputManager'].getLastEcho().rstrip() + lastEcho = self.env['runtime']['outputManager'].getLastEcho() + if lastEcho.rstrip() != "": + lastEcho = lastEcho.rstrip() self.env['runtime']['memoryManager'].addValueToFirstIndex('clipboardHistory', lastEcho) self.env['runtime']['outputManager'].presentText(lastEcho, soundIcon='CopyToClipboard', interrupt=True)