Merge branch 'bleed' of https://github.com/chrys87/fenrir into bleed

This commit is contained in:
Storm Dragon 2018-03-24 16:32:47 -04:00
commit cdaf6daffb

View File

@ -86,7 +86,6 @@ class screenManager():
if oldScreenText == '' and\ if oldScreenText == '' and\
newScreenText != '': newScreenText != '':
self.env['screen']['newDelta'] = newScreenText self.env['screen']['newDelta'] = newScreenText
print(1)
else: else:
cursorLineStart = self.env['screen']['newCursor']['y'] * self.env['screen']['columns'] + self.env['screen']['newCursor']['y'] cursorLineStart = self.env['screen']['newCursor']['y'] * self.env['screen']['columns'] + self.env['screen']['newCursor']['y']
cursorLineEnd = cursorLineStart + self.env['screen']['columns'] cursorLineEnd = cursorLineStart + self.env['screen']['columns']
@ -111,12 +110,10 @@ class screenManager():
if tempNewDelta != ''.join(newScreenText[self.env['screen']['oldCursor']['x']:self.env['screen']['newCursor']['x']].rstrip()): 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']]] diffList = ['+ ' + self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']]]
typing = True typing = True
print(2)
else: else:
diff = difflib.ndiff( oldScreenText.split('\n'),\ diff = difflib.ndiff( oldScreenText.split('\n'),\
newScreenText.split('\n')) newScreenText.split('\n'))
diffList = list(diff) diffList = list(diff)
print(3)
if self.env['runtime']['settingsManager'].getSetting('general', 'newLinePause') and not typing: if self.env['runtime']['settingsManager'].getSetting('general', 'newLinePause') and not typing:
self.env['screen']['newDelta'] = '\n'.join(x[2:] for x in diffList if x[0] == '+') self.env['screen']['newDelta'] = '\n'.join(x[2:] for x in diffList if x[0] == '+')