fix presentation of finch

This commit is contained in:
chrys
2018-07-19 22:09:50 +02:00
parent 33bd2d399c
commit 46c622d27d
10 changed files with 12 additions and 463 deletions

View File

@ -19,6 +19,7 @@ class command():
def run(self):
if not self.env['runtime']['settingsManager'].getSettingAsBool('speech', 'autoReadIncoming'):
return
# is there something to read?
if not self.env['runtime']['screenManager'].isDelta(ignoreSpace=True):
return
@ -27,11 +28,11 @@ class command():
#if len(self.env['screen']['newDelta'].strip(' \n\t')) <= 1:
xMove = abs(self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x'])
yMove = abs(self.env['screen']['newCursor']['y'] - self.env['screen']['oldCursor']['y'])
if (xMove >= 1) and xMove == len(self.env['screen']['newDelta']):
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
#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)