Update copy_marked_to_clipboard.py

This commit is contained in:
chrys87 2016-09-20 16:18:23 +02:00 committed by GitHub
parent 03bd74d7c4
commit 86b4512faf

View File

@ -25,10 +25,8 @@ class command():
# use the last first and the last setted mark as range # use the last first and the last setted mark as range
startMark = environment['commandBuffer']['Marks']['1'].copy() startMark = environment['commandBuffer']['Marks']['1'].copy()
if environment['commandBuffer']['Marks']['3'] != None: endMark = environment['commandBuffer']['Marks']['2'].copy()
endMark = environment['commandBuffer']['Marks']['3'].copy()
else:
endMark = environment['commandBuffer']['Marks']['2'].copy()
marked = mark_utils.getTextBetweenMarks(startMark, endMark, environment['screenData']['newContentText']) marked = mark_utils.getTextBetweenMarks(startMark, endMark, environment['screenData']['newContentText'])
environment['commandBuffer']['clipboard'] = [marked] + environment['commandBuffer']['clipboard'][:environment['runtime']['settingsManager'].getSettingAsFloat(environment, 'general', 'numberOfClipboards') -1] environment['commandBuffer']['clipboard'] = [marked] + environment['commandBuffer']['clipboard'][:environment['runtime']['settingsManager'].getSettingAsFloat(environment, 'general', 'numberOfClipboards') -1]
@ -36,7 +34,6 @@ class command():
# reset marks # reset marks
environment['commandBuffer']['Marks']['1'] = None environment['commandBuffer']['Marks']['1'] = None
environment['commandBuffer']['Marks']['2'] = None environment['commandBuffer']['Marks']['2'] = None
environment['commandBuffer']['Marks']['3'] = None
if marked.strip(" \t\n") == '': if marked.strip(" \t\n") == '':
environment['runtime']['outputManager'].presentText(environment, "blank", soundIcon='EmptyLine', interrupt=True) environment['runtime']['outputManager'].presentText(environment, "blank", soundIcon='EmptyLine', interrupt=True)