Revert "test to remove unnedeed stuff"

This reverts commit c30e937b5d.
This commit is contained in:
chrys 2017-11-09 19:50:30 +01:00
parent c30e937b5d
commit 553f5dc456

View File

@ -12,6 +12,7 @@
import difflib import difflib
import re
import subprocess import subprocess
import glob, os import glob, os
import termios import termios
@ -325,8 +326,8 @@ class driver(screenDriver):
self.env['screen']['newAttribDelta'] = '' self.env['screen']['newAttribDelta'] = ''
# changes on the screen # changes on the screen
oldScreenText = self.env['runtime']['screenManager'].getWindowAreaInText(self.env['screen']['oldContentText']) oldScreenText = re.sub(' +',' ',self.env['runtime']['screenManager'].getWindowAreaInText(self.env['screen']['oldContentText']))
newScreenText = self.env['runtime']['screenManager'].getWindowAreaInText(self.env['screen']['newContentText']) newScreenText = re.sub(' +',' ',self.env['runtime']['screenManager'].getWindowAreaInText(self.env['screen']['newContentText']))
typing = False typing = False
if (self.env['screen']['oldContentText'] != self.env['screen']['newContentText']): if (self.env['screen']['oldContentText'] != self.env['screen']['newContentText']):
if self.env['screen']['newContentText'] != '' and self.env['screen']['oldContentText'] == '': 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:]: self.env['screen']['newContentText'][cursorLineEnd:] == self.env['screen']['oldContentText'][cursorLineEnd:]:
cursorLineStartOffset = cursorLineStart cursorLineStartOffset = cursorLineStart
cursorLineEndOffset = cursorLineEnd 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: if cursorLineEnd > cursorLineStart + self.env['screen']['newCursor']['x'] + 3:
cursorLineEndOffset = cursorLineStart + self.env['screen']['newCursor']['x'] + 3 cursorLineEndOffset = cursorLineStart + self.env['screen']['newCursor']['x'] + 3
oldScreenText = self.env['screen']['oldContentText'][cursorLineStartOffset:cursorLineEndOffset] oldScreenText = self.env['screen']['oldContentText'][cursorLineStartOffset:cursorLineEndOffset]
oldScreenText = re.sub(' +',' ',oldScreenText)
newScreenText = self.env['screen']['newContentText'][cursorLineStartOffset:cursorLineEndOffset] newScreenText = self.env['screen']['newContentText'][cursorLineStartOffset:cursorLineEndOffset]
newScreenText = re.sub(' +',' ',newScreenText)
diff = difflib.ndiff(oldScreenText, newScreenText) diff = difflib.ndiff(oldScreenText, newScreenText)
typing = True typing = True
else: else: