fix clipboard

This commit is contained in:
chrys 2016-09-28 22:06:10 +02:00
parent 5551d19ed4
commit f384752a5d

View File

@ -22,14 +22,13 @@ class command():
self.env['commandBuffer']['Marks']['2']):
self.env['runtime']['outputManager'].presentText("two marks needed", interrupt=True)
return
# use the last first and the last setted mark as range
startMark = self.env['commandBuffer']['Marks']['1'].copy()
endMark = self.env['commandBuffer']['Marks']['2'].copy()
marked = mark_utils.getTextBetweenMarks(startMark, endMark, self.env['screenData']['newContentText'])
self.env['commandBuffer']['clipboard'] = [marked] + self.env['commandBuffer']['clipboard'][:self.env['runtime']['settingsManager'].getSettingAsFloat('general', 'numberOfClipboards') -1]
self.env['commandBuffer']['clipboard'] = [marked] + self.env['commandBuffer']['clipboard'][:self.env['runtime']['settingsManager'].getSettingAsInt('general', 'numberOfClipboards') -1]
self.env['commandBuffer']['currClipboard'] = 0
# reset marks
self.env['commandBuffer']['Marks']['1'] = None