fix word announcement

This commit is contained in:
chrys
2016-08-08 20:59:07 +02:00
parent 79c650577f
commit 22b24fcb6e
4 changed files with 16 additions and 9 deletions

View File

@ -29,9 +29,15 @@ class command():
# get the word
newContent = environment['screenData']['newContentText'].split('\n')[environment['screenData']['newCursor']['y']]
x, y, currWord = word_utils.getCurrentWord(environment['screenData']['newCursor']['x'], 0, newContent)
if not(newContent[environment['screenData']['newCursor']['x']].strip(" \t\n") == '' and x != environment['screenData']['newCursor']['x']):
return environment
print('word')
# was this a typed word?
if environment['screenData']['newDelta'] != '':
if not(newContent[environment['screenData']['oldCursor']['x']].strip(" \t\n") == '' and x != environment['screenData']['oldCursor']['x']):
return environment
else:
# or just arrow arround?
if not(newContent[environment['screenData']['newCursor']['x']].strip(" \t\n") == '' and x != environment['screenData']['newCursor']['x']):
return environment
if currWord != '':
environment['runtime']['outputManager'].presentText(environment, currWord, interrupt=True)