From 553f5dc45667405613638c7fcfe7d5bfa6b322ec Mon Sep 17 00:00:00 2001 From: chrys Date: Thu, 9 Nov 2017 19:50:30 +0100 Subject: [PATCH] Revert "test to remove unnedeed stuff" This reverts commit c30e937b5da1e3a09a7be1595bc039b935a0c80a. --- src/fenrir/screenDriver/vcsaDriver.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/fenrir/screenDriver/vcsaDriver.py b/src/fenrir/screenDriver/vcsaDriver.py index a7cc05b1..10b1c180 100644 --- a/src/fenrir/screenDriver/vcsaDriver.py +++ b/src/fenrir/screenDriver/vcsaDriver.py @@ -12,6 +12,7 @@ import difflib +import re import subprocess import glob, os import termios @@ -325,8 +326,8 @@ class driver(screenDriver): self.env['screen']['newAttribDelta'] = '' # changes on the screen - oldScreenText = self.env['runtime']['screenManager'].getWindowAreaInText(self.env['screen']['oldContentText']) - newScreenText = self.env['runtime']['screenManager'].getWindowAreaInText(self.env['screen']['newContentText']) + oldScreenText = re.sub(' +',' ',self.env['runtime']['screenManager'].getWindowAreaInText(self.env['screen']['oldContentText'])) + newScreenText = re.sub(' +',' ',self.env['runtime']['screenManager'].getWindowAreaInText(self.env['screen']['newContentText'])) typing = False if (self.env['screen']['oldContentText'] != self.env['screen']['newContentText']): if self.env['screen']['newContentText'] != '' and self.env['screen']['oldContentText'] == '': @@ -342,10 +343,14 @@ class driver(screenDriver): self.env['screen']['newContentText'][cursorLineEnd:] == self.env['screen']['oldContentText'][cursorLineEnd:]: cursorLineStartOffset = cursorLineStart cursorLineEndOffset = cursorLineEnd + #if cursorLineStart < cursorLineStart + self.env['screen']['newCursor']['x'] - 4: + # cursorLineStartOffset = cursorLineStart + self.env['screen']['newCursor']['x'] - 4 if cursorLineEnd > cursorLineStart + self.env['screen']['newCursor']['x'] + 3: cursorLineEndOffset = cursorLineStart + self.env['screen']['newCursor']['x'] + 3 oldScreenText = self.env['screen']['oldContentText'][cursorLineStartOffset:cursorLineEndOffset] + oldScreenText = re.sub(' +',' ',oldScreenText) newScreenText = self.env['screen']['newContentText'][cursorLineStartOffset:cursorLineEndOffset] + newScreenText = re.sub(' +',' ',newScreenText) diff = difflib.ndiff(oldScreenText, newScreenText) typing = True else: