From da189bb19eb2878a10bf0e6db07f48136643dcd4 Mon Sep 17 00:00:00 2001 From: chrys Date: Fri, 2 Sep 2016 22:33:41 +0200 Subject: [PATCH] cleanup --- src/fenrir-package/screen/linux.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/fenrir-package/screen/linux.py b/src/fenrir-package/screen/linux.py index 450fb318..32cb9fa9 100644 --- a/src/fenrir-package/screen/linux.py +++ b/src/fenrir-package/screen/linux.py @@ -64,10 +64,10 @@ class screen(): environment['screenData']['oldCursor']['x'] = 0 environment['screenData']['oldCursor']['y'] = 0 environment['screenData']['oldDelta'] = '' - environment['screenData']['newDelta'] = '' environment['screenData']['oldNegativeDelta'] = '' - environment['screenData']['newNegativeDelta'] = '' - + # always clear deltas + environment['screenData']['newNegativeDelta'] = '' + environment['screenData']['newDelta'] = '' # changes on the screen if (environment['screenData']['oldContentText'] != environment['screenData']['newContentText']) and \ (environment['screenData']['newContentText'] != '' ): @@ -86,7 +86,5 @@ class screen(): environment['screenData']['newDelta'] = ''.join(x[2:] for x in diffList if x.startswith('+ ')) environment['screenData']['newNegativeDelta'] = ''.join(x[2:] for x in diffList if x.startswith('- ')) - else: - environment['screenData']['newNegativeDelta'] = '' - environment['screenData']['newDelta'] = '' + return environment