find last char logic

This commit is contained in:
chrys87 2016-07-19 10:11:44 +02:00 committed by GitHub
parent b58ce43dcd
commit 5ee7874d13

View File

@ -7,7 +7,13 @@ class command():
environment['screenData']['oldCursorReview'] = environment['screenData']['newCursorReview'] environment['screenData']['oldCursorReview'] = environment['screenData']['newCursorReview']
if environment['screenData']['newCursorReview']['y'] == -1: if environment['screenData']['newCursorReview']['y'] == -1:
environment['screenData']['newCursorReview'] = environment['screenData']['newCursor'].copy() environment['screenData']['newCursorReview'] = environment['screenData']['newCursor'].copy()
wrappedLines = environment['screenData']['newContentText'].split('\n') wrappedLines = environment['screenData']['newContentText'].split('\n')
if environment['screenData']['newCursorReview']['x'] - 1 < 0:
if environment['screenData']['newCursorReview']['y'] -1 > 0:
environment['screenData']['newCursorReview']['y'] -= 1
environment['screenData']['newCursorReview']['x'] = len(wrappedLines[environment['screenData']['newCursorReview']['y']) - 1
else:
environment['screenData']['newCursorReview']['x'] =- 1
if wrappedLines[environment['screenData']['newCursorReview']['y']][environment['screenData']['newCursorReview']['x']].strip(" \t\n") == '': if wrappedLines[environment['screenData']['newCursorReview']['y']][environment['screenData']['newCursorReview']['x']].strip(" \t\n") == '':
environment['runtime']['outputManager'].presentText(environment, "blank") environment['runtime']['outputManager'].presentText(environment, "blank")
else: else: