From 455aacf834a5265b6abe4fea12ce6d7a502a531b Mon Sep 17 00:00:00 2001 From: chrys Date: Sat, 24 Sep 2016 23:42:16 +0200 Subject: [PATCH] improve set/clear window mode commands --- src/fenrir-package/screenDriver/linux.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/fenrir-package/screenDriver/linux.py b/src/fenrir-package/screenDriver/linux.py index 4cd8ee7e..59e02aa2 100644 --- a/src/fenrir-package/screenDriver/linux.py +++ b/src/fenrir-package/screenDriver/linux.py @@ -127,9 +127,9 @@ class driver(): print(newScreenText) if (self.env['screenData']['oldContentText'] != self.env['screenData']['newContentText']) and \ (self.env['screenData']['newContentText'] != '' ): - if self.env['screenData']['oldContentText'] == '' and\ - self.env['screenData']['newContentText'] != '': - self.env['screenData']['newDelta'] = self.env['screenData']['newContentText'] + if oldScreenText == '' and\ + newScreenText != '': + self.env['screenData']['newDelta'] = newScreenText else: diffStart = 0 if self.env['screenData']['oldCursor']['x'] != self.env['screenData']['newCursor']['x'] and \ @@ -139,8 +139,8 @@ class driver(): diff = difflib.ndiff(self.env['screenData']['oldContentText'][diffStart:diffStart + self.env['screenData']['columns']],\ self.env['screenData']['newContentText'][diffStart:diffStart + self.env['screenData']['columns']]) else: - diff = difflib.ndiff( self.env['screenData']['oldContentText'][diffStart:].split('\n'),\ - self.env['screenData']['newContentText'][diffStart:].split('\n')) + diff = difflib.ndiff( oldScreenText[diffStart:].split('\n'),\ + newScreenText[diffStart:].split('\n')) diffList = list(diff)