imporove tab and char echo accuracy
This commit is contained in:
parent
fe96d204a7
commit
8e39b7b884
@ -24,6 +24,12 @@ class command():
|
|||||||
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 > 1:
|
||||||
return
|
return
|
||||||
|
if self.env['runtime']['inputManager'].getShortcutType() in ['KEY']:
|
||||||
|
if self.env['runtime']['inputManager'].getLastDeepestInput() in [['KEY_TAB']]:
|
||||||
|
return
|
||||||
|
elif self.env['runtime']['inputManager'].getShortcutType() in ['BYTE']:
|
||||||
|
if self.env['runtime']['byteManager'].getLastByteKey() in [b' ', b'\t']:
|
||||||
|
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']:
|
||||||
return
|
return
|
||||||
|
@ -18,14 +18,14 @@ 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 = self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x']
|
||||||
if xMove == 1:
|
if xMove > 0:
|
||||||
return
|
return
|
||||||
if self.env['runtime']['inputManager'].getShortcutType() in ['KEY']:
|
if self.env['runtime']['inputManager'].getShortcutType() in ['KEY']:
|
||||||
if not (self.env['runtime']['inputManager'].getLastDeepestInput() in [['KEY_TAB']]):
|
if not (self.env['runtime']['inputManager'].getLastDeepestInput() in [['KEY_TAB']]):
|
||||||
return
|
return
|
||||||
if self.env['runtime']['inputManager'].getShortcutType() in ['BYTE']:
|
elif self.env['runtime']['inputManager'].getShortcutType() in ['BYTE']:
|
||||||
if not (self.env['runtime']['byteManager'].getLastByteKey() in [b' '):
|
if not (self.env['runtime']['byteManager'].getLastByteKey() in [b' ', b'\t']):
|
||||||
return
|
return
|
||||||
# is there any change?
|
# is there any change?
|
||||||
if not self.env['runtime']['screenManager'].isDelta():
|
if not self.env['runtime']['screenManager'].isDelta():
|
||||||
|
Loading…
Reference in New Issue
Block a user