improve set/clear window mode commands
This commit is contained in:
parent
bfcd32465b
commit
455aacf834
@ -127,9 +127,9 @@ class driver():
|
|||||||
print(newScreenText)
|
print(newScreenText)
|
||||||
if (self.env['screenData']['oldContentText'] != self.env['screenData']['newContentText']) and \
|
if (self.env['screenData']['oldContentText'] != self.env['screenData']['newContentText']) and \
|
||||||
(self.env['screenData']['newContentText'] != '' ):
|
(self.env['screenData']['newContentText'] != '' ):
|
||||||
if self.env['screenData']['oldContentText'] == '' and\
|
if oldScreenText == '' and\
|
||||||
self.env['screenData']['newContentText'] != '':
|
newScreenText != '':
|
||||||
self.env['screenData']['newDelta'] = self.env['screenData']['newContentText']
|
self.env['screenData']['newDelta'] = newScreenText
|
||||||
else:
|
else:
|
||||||
diffStart = 0
|
diffStart = 0
|
||||||
if self.env['screenData']['oldCursor']['x'] != self.env['screenData']['newCursor']['x'] and \
|
if self.env['screenData']['oldCursor']['x'] != self.env['screenData']['newCursor']['x'] and \
|
||||||
@ -139,8 +139,8 @@ class driver():
|
|||||||
diff = difflib.ndiff(self.env['screenData']['oldContentText'][diffStart:diffStart + self.env['screenData']['columns']],\
|
diff = difflib.ndiff(self.env['screenData']['oldContentText'][diffStart:diffStart + self.env['screenData']['columns']],\
|
||||||
self.env['screenData']['newContentText'][diffStart:diffStart + self.env['screenData']['columns']])
|
self.env['screenData']['newContentText'][diffStart:diffStart + self.env['screenData']['columns']])
|
||||||
else:
|
else:
|
||||||
diff = difflib.ndiff( self.env['screenData']['oldContentText'][diffStart:].split('\n'),\
|
diff = difflib.ndiff( oldScreenText[diffStart:].split('\n'),\
|
||||||
self.env['screenData']['newContentText'][diffStart:].split('\n'))
|
newScreenText[diffStart:].split('\n'))
|
||||||
|
|
||||||
diffList = list(diff)
|
diffList = list(diff)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user