improve review commands

This commit is contained in:
chrys 2016-07-15 00:08:08 +02:00
parent 1748c28ecf
commit 73338931bd
3 changed files with 3 additions and 4 deletions

View File

@ -8,7 +8,7 @@ class command():
if environment['screenData']['newCursorReview']['y'] == -1:
environment['screenData']['newCursorReview'] = environment['screenData']['newCursor'].copy()
if environment['screenData']['newContentText'].replace(" ","") == '':
if environment['screenData']['newContentText'].split('\n')[environment['screenData']['newCursorReview']['y']].replace(" ","").replace("\n","").replace("\t","") == '':
environment['runtime']['outputManager'].speakText(environment, "empty line")
else:
environment['runtime']['outputManager'].speakText(environment, environment['screenData']['newContentText'].split('\n')[environment['screenData']['newCursorReview']['y']])

View File

@ -10,7 +10,7 @@ class command():
if environment['screenData']['newCursorReview']['y'] + 1 < environment['screenData']['lines']:
environment['screenData']['newCursorReview']['y'] = environment['screenData']['newCursorReview']['y'] + 1
if environment['screenData']['newContentText'].replace(" ","") == '':
if environment['screenData']['newContentText'].split('\n')[environment['screenData']['newCursorReview']['y']].replace(" ","").replace("\n","").replace("\t","") == '':
environment['runtime']['outputManager'].speakText(environment, "empty line")
else:
environment['runtime']['outputManager'].speakText(environment, environment['screenData']['newContentText'].split('\n')[environment['screenData']['newCursorReview']['y']])

View File

@ -9,8 +9,7 @@ class command():
environment['screenData']['newCursorReview'] = environment['screenData']['newCursor'].copy()
if environment['screenData']['newCursorReview']['y'] - 1 >= 0:
environment['screenData']['newCursorReview']['y'] = environment['screenData']['newCursorReview']['y'] - 1
if environment['screenData']['newContentText'].replace(" ","") == '':
if environment['screenData']['newContentText'].split('\n')[environment['screenData']['newCursorReview']['y']].replace(" ","").replace("\n","").replace("\t","") == '':
environment['runtime']['outputManager'].speakText(environment, "empty line")
else:
environment['runtime']['outputManager'].speakText(environment, environment['screenData']['newContentText'].split('\n')[environment['screenData']['newCursorReview']['y']])