try to harden tab completion
This commit is contained in:
parent
cacfaac649
commit
fe96d204a7
@ -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
|
||||
|
@ -14,7 +14,7 @@ class command():
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No Description found'
|
||||
return 'No Description found'
|
||||
|
||||
def run(self):
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('speech', 'autoReadIncoming'):
|
||||
@ -31,7 +31,7 @@ class command():
|
||||
if (xMove >= 1) and xMove == len(self.env['screen']['newDelta']):
|
||||
# if len(self.env['screen']['newDelta'].strip(' \n\t0123456789')) <= 2:
|
||||
if not '\n' in self.env['screen']['newDelta']:
|
||||
return
|
||||
return
|
||||
#print(xMove, yMove, len(self.env['screen']['newDelta']), len(self.env['screen']['newNegativeDelta']))
|
||||
self.env['runtime']['outputManager'].presentText(self.env['screen']['newDelta'], interrupt=False, flush=False)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user