Update 55000-tab_completion.py

This commit is contained in:
chrys 2019-08-23 10:09:30 +02:00 committed by GitHub
parent c7f62cd1ff
commit 288661afa2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,12 +19,12 @@ class command():
def run(self): def run(self):
# try to detect the tab completion by cursor change # try to detect the tab completion by cursor change
xMove = abs(self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x']) xMove = abs(self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x'])
if xMove == 1: if xMove <= 2:
return return
# is there any change? # is there any change?
if not self.env['runtime']['screenManager'].isDelta(): if not self.env['runtime']['screenManager'].isDelta():
return return
if not( (xMove > 1) and xMove == len(self.env['screen']['newDelta'])): if not xMove == len(self.env['screen']['newDelta']):
return return
# detect deletion or chilling # detect deletion or chilling
if self.env['screen']['newCursor']['x'] <= self.env['screen']['oldCursor']['x']: if self.env['screen']['newCursor']['x'] <= self.env['screen']['oldCursor']['x']: