ignore lineshift
This commit is contained in:
parent
ed1aec1901
commit
d1a17dee91
@ -27,12 +27,23 @@ class command():
|
|||||||
#if len(self.env['screen']['newDelta'].strip(' \n\t')) <= 1:
|
#if len(self.env['screen']['newDelta'].strip(' \n\t')) <= 1:
|
||||||
xMove = abs(self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x'])
|
xMove = abs(self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x'])
|
||||||
yMove = abs(self.env['screen']['newCursor']['y'] - self.env['screen']['oldCursor']['y'])
|
yMove = abs(self.env['screen']['newCursor']['y'] - self.env['screen']['oldCursor']['y'])
|
||||||
|
#print('-----')
|
||||||
if (xMove >= 1) and xMove == len(self.env['screen']['newDelta']):
|
#print(self.env['screen']['newDelta'])
|
||||||
|
#print(xMove, yMove, len(self.env['screen']['newNegativeDelta']), self.env['screen']['newNegativeDelta'])
|
||||||
|
#print(xMove, yMove, len(self.env['screen']['newDelta']), self.env['screen']['newDelta'])
|
||||||
|
if (xMove >= 1) and abs(xMove) == len(self.env['screen']['newDelta']):
|
||||||
# if len(self.env['screen']['newDelta'].strip(' \n\t0123456789')) <= 2:
|
# if len(self.env['screen']['newDelta'].strip(' \n\t0123456789')) <= 2:
|
||||||
if not '\n' in self.env['screen']['newDelta']:
|
if not '\n' in self.env['screen']['newDelta']:
|
||||||
|
print('out')
|
||||||
return
|
return
|
||||||
#print(xMove, yMove, len(self.env['screen']['newDelta']), len(self.env['screen']['newNegativeDelta']))
|
# shift line
|
||||||
|
if (xMove != 0) and len(self.env['screen']['newNegativeDelta']) == 0:
|
||||||
|
return
|
||||||
|
# filter out delete
|
||||||
|
if (xMove == 0) and (yMove == 0):
|
||||||
|
if len(self.env['screen']['newNegativeDelta']) - len(self.env['screen']['newDelta']) in [1,2,3]:
|
||||||
|
return
|
||||||
|
|
||||||
self.env['runtime']['outputManager'].presentText(self.env['screen']['newDelta'], interrupt=False, flush=False)
|
self.env['runtime']['outputManager'].presentText(self.env['screen']['newDelta'], interrupt=False, flush=False)
|
||||||
|
|
||||||
def setCallback(self, callback):
|
def setCallback(self, callback):
|
||||||
|
Loading…
Reference in New Issue
Block a user