remove parameter

This commit is contained in:
chrys 2018-05-27 22:44:17 +02:00
parent f56e57dfe2
commit a334139902
2 changed files with 5 additions and 6 deletions

View File

@ -156,16 +156,15 @@ class attributeManager():
attributeFormatString = attributeFormatString.replace('fenrirFont', _('default'))
return attributeFormatString
def trackHighlights(self, oldAttr, newAttr, text, lenght):
def trackHighlights(self, oldAttr, newAttr, text):
result = ''
currCursor = None
#if oldAttr == newAttr:
# return result, currCursor
if oldAttr == newAttr:
return result, currCursor
if len(newAttr) == 0:
print('len')
return result, currCursor
if len(oldAttr) != len(newAttr):
print('ON len')
return result, currCursor
textLines = text.split('\n')

View File

@ -159,7 +159,7 @@ class screenManager():
try:
if self.env['screen']['oldContentAttrib'] != self.env['screen']['newContentAttrib']:
if self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'highlight'):
self.env['screen']['newAttribDelta'], self.env['screen']['newCursorAttrib'] = self.env['runtime']['attributeManager'].trackHighlights(self.env['screen']['oldContentAttrib'], self.env['screen']['newContentAttrib'], self.env['screen']['newContentText'], self.env['screen']['columns'])
self.env['screen']['newAttribDelta'], self.env['screen']['newCursorAttrib'] = self.env['runtime']['attributeManager'].trackHighlights(self.env['screen']['oldContentAttrib'], self.env['screen']['newContentAttrib'], self.env['screen']['newContentText'])
except Exception as e:
print(e)
self.env['runtime']['debug'].writeDebugOut('screenManager:update:highlight: ' + str(e),debug.debugLevel.ERROR)