Update set_clipboard_mark.py

This commit is contained in:
chrys87 2016-08-23 17:28:23 +02:00 committed by GitHub
parent ea94dc2f09
commit 8d4c5718b8

View File

@ -6,11 +6,15 @@ class command():
def __init__(self): def __init__(self):
pass pass
def run(self, environment): def run(self, environment):
if len(environment['commandBuffer']['clipboard']) == 0: if environment['screenData']['newCursorReview'] == None:
environment['runtime']['outputManager'].presentText(environment, 'clipboard empty', interrupt=True) environment['runtime']['outputManager'].presentText(environment, 'no review cursor', interrupt=True)
return environment
environment['commandBuffer']['currClipboard'] = 0 if environment['commandBuffer']['clipboardMark']['1'] == None:
environment['runtime']['outputManager'].presentText(environment, environment['commandBuffer']['clipboard'][environment['commandBuffer']['currClipboard']], interrupt=True) 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 return environment
def setCallback(self, callback): def setCallback(self, callback):
pass pass