diff --git a/src/fenrir-package/commands/commands/marked_text.py b/src/fenrir-package/commands/commands/marked_text.py index 5c4a3722..6cb68143 100644 --- a/src/fenrir-package/commands/commands/marked_text.py +++ b/src/fenrir-package/commands/commands/marked_text.py @@ -9,9 +9,15 @@ class command(): (environment['commandBuffer']['Marks']['2'] == None): environment['runtime']['outputManager'].presentText(environment, "two marks needed", interrupt=True) return environment - - marked = mark_utils.getTextBetweenMarks(environment['commandBuffer']['Marks']['1'], environment['commandBuffer']['Marks']['2'], environment['screenData']['newContentText'].split('\n')) - print(marked) + + # use the last first and the last setted mark as range + startMark = environment['commandBuffer']['Marks']['1'].copy() + endMark = environment['commandBuffer']['Marks']['2'].copy() + if environment['commandBuffer']['Marks']['3'] != None: + endMark = environment['commandBuffer']['Marks']['3'].copy() + + marked = mark_utils.getTextBetweenMarks(startMark, endMark, environment['screenData']['newContentText'].split('\n')) + if marked.strip(" \t\n") == '': environment['runtime']['outputManager'].presentText(environment, "blank", soundIcon='EmptyLine', interrupt=True) else: