Update linux.py

This commit is contained in:
chrys87 2016-09-02 13:25:50 +02:00 committed by GitHub
parent f1b4eba933
commit 0cc0b01037

View File

@ -85,8 +85,8 @@ class screen():
environment['screenData']['oldCursor']['y'] == environment['screenData']['newCursor']['y'] and \ environment['screenData']['oldCursor']['y'] == environment['screenData']['newCursor']['y'] and \
environment['screenData']['newContentText'][:environment['screenData']['newCursor']['y']] == environment['screenData']['oldContentText'][:environment['screenData']['newCursor']['y']]: environment['screenData']['newContentText'][:environment['screenData']['newCursor']['y']] == environment['screenData']['oldContentText'][:environment['screenData']['newCursor']['y']]:
diffStart = environment['screenData']['newCursor']['y'] * environment['screenData']['newCursor']['x'] + environment['screenData']['newCursor']['y'] diffStart = environment['screenData']['newCursor']['y'] * environment['screenData']['newCursor']['x'] + environment['screenData']['newCursor']['y']
diff = difflib.ndiff(environment['screenData']['oldContentText'][diffStart:],\ diff = difflib.ndiff(environment['screenData']['oldContentText'][diffStart:diffStart + environment['screenData']['columns']],\
environment['screenData']['newContentText'][diffStart:]) environment['screenData']['newContentText'][diffStart:diffStart + environment['screenData']['columns']])
else: else:
diff = difflib.ndiff( environment['screenData']['oldContentText'][diffStart:].split('\n'),\ diff = difflib.ndiff( environment['screenData']['oldContentText'][diffStart:].split('\n'),\
environment['screenData']['newContentText'][diffStart:].split('\n')) environment['screenData']['newContentText'][diffStart:].split('\n'))