fix read whole line

This commit is contained in:
chrys 2017-11-10 23:26:37 +01:00
parent 40dc9178b5
commit 2ff7e91f9a

View File

@ -355,9 +355,9 @@ class driver(screenDriver):
diff = difflib.ndiff(oldScreenText, newScreenText)
diffList = list(diff)
tempNewDelta = ''.join(x[2:] for x in diffList if x[0] == '+')
if tempNewDelta != ''.join(newScreenText[self.env['screen']['oldCursor']['x']:self.env['screen']['newCursor']['x']].rstrip()):
diffList = ['+ ' + self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']]]
if tempNewDelta.strip() != '':
if tempNewDelta != ''.join(newScreenText[self.env['screen']['oldCursor']['x']:self.env['screen']['newCursor']['x']].rstrip()):
diffList = ['+ ' + self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']]]
typing = True
else: