try to harden tab completion

This commit is contained in:
Chrys
2019-09-06 18:16:13 +02:00
parent cacfaac649
commit fe96d204a7
2 changed files with 10 additions and 4 deletions

View File

@ -21,11 +21,17 @@ class command():
xMove = abs(self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x'])
if xMove == 1:
return
if self.env['runtime']['inputManager'].getShortcutType() in ['KEY']:
if not (self.env['runtime']['inputManager'].getLastDeepestInput() in [['KEY_TAB']]):
return
if self.env['runtime']['inputManager'].getShortcutType() in ['BYTE']:
if not (self.env['runtime']['byteManager'].getLastByteKey() in [b' '):
return
# is there any change?
if not self.env['runtime']['screenManager'].isDelta():
return
return
if not xMove == len(self.env['screen']['newDelta']):
return
return
# detect deletion or chilling
if self.env['screen']['newCursor']['x'] <= self.env['screen']['oldCursor']['x']:
return