word start produce a delta of 2 |c |, move the echos back to input

This commit is contained in:
chrys 2016-10-22 12:36:28 +02:00
parent e3f736cb4f
commit 141377b7b8
2 changed files with 5 additions and 4 deletions

View File

@ -19,20 +19,21 @@ class command():
def run(self):
if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'charDeleteEcho'):
return
# detect typing or chilling
if self.env['screenData']['newCursor']['x'] >= self.env['screenData']['oldCursor']['x']:
return
# More than just a deletion happend
if self.env['screenData']['newDelta'].strip() != '':
if self.env['screenData']['newDelta'] != self.env['screenData']['oldDelta']:
return
return
# No deletion
if self.env['screenData']['newNegativeDelta'] == '':
return
# too much for a single backspace...
if len(self.env['screenData']['newNegativeDelta']) >= 2:
# word begin produce a diff wiht len == 2 |a | others with 1 |a|
if len(self.env['screenData']['newNegativeDelta']) > 2:
return
self.env['runtime']['outputManager'].presentText(self.env['screenData']['newNegativeDelta'], interrupt=True, ignorePunctuation=True, announceCapital=True)