From a334139902b7ffb238d07e2fb5f996dcab430762 Mon Sep 17 00:00:00 2001 From: chrys Date: Sun, 27 May 2018 22:44:17 +0200 Subject: [PATCH] remove parameter --- src/fenrirscreenreader/core/attributeManager.py | 9 ++++----- src/fenrirscreenreader/core/screenManager.py | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/fenrirscreenreader/core/attributeManager.py b/src/fenrirscreenreader/core/attributeManager.py index ebe35747..f0061e92 100644 --- a/src/fenrirscreenreader/core/attributeManager.py +++ b/src/fenrirscreenreader/core/attributeManager.py @@ -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') diff --git a/src/fenrirscreenreader/core/screenManager.py b/src/fenrirscreenreader/core/screenManager.py index 4afd6e9d..eb58635e 100644 --- a/src/fenrirscreenreader/core/screenManager.py +++ b/src/fenrirscreenreader/core/screenManager.py @@ -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)