From 8d4c5718b88e29314083663de28dfdb1e06fdd60 Mon Sep 17 00:00:00 2001 From: chrys87 Date: Tue, 23 Aug 2016 17:28:23 +0200 Subject: [PATCH] Update set_clipboard_mark.py --- .../commands/commands/set_clipboard_mark.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/fenrir-package/commands/commands/set_clipboard_mark.py b/src/fenrir-package/commands/commands/set_clipboard_mark.py index b08db827..da1bf121 100644 --- a/src/fenrir-package/commands/commands/set_clipboard_mark.py +++ b/src/fenrir-package/commands/commands/set_clipboard_mark.py @@ -6,11 +6,15 @@ class command(): def __init__(self): pass def run(self, environment): - if len(environment['commandBuffer']['clipboard']) == 0: - environment['runtime']['outputManager'].presentText(environment, 'clipboard empty', interrupt=True) - return environment - environment['commandBuffer']['currClipboard'] = 0 - environment['runtime']['outputManager'].presentText(environment, environment['commandBuffer']['clipboard'][environment['commandBuffer']['currClipboard']], interrupt=True) + if environment['screenData']['newCursorReview'] == None: + environment['runtime']['outputManager'].presentText(environment, 'no review cursor', interrupt=True) + + if environment['commandBuffer']['clipboardMark']['1'] == None: + environment['commandBuffer']['clipboardMark']['1'] = environment['screenData']['newCursorReview'] + else: + environment['commandBuffer']['clipboardMark']['2'] = environment['screenData']['newCursorReview'] + + environment['runtime']['outputManager'].presentText(environment, 'set mark', interrupt=True) return environment def setCallback(self, callback): pass