From 1b29d24b0affbcde1ef2c1d50962ab4d7bd54cff Mon Sep 17 00:00:00 2001 From: chrys87 Date: Tue, 19 Jul 2016 10:15:56 +0200 Subject: [PATCH] find next char logic --- src/fenrir-package/commands/commands/next_char | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/fenrir-package/commands/commands/next_char b/src/fenrir-package/commands/commands/next_char index 62e8b05f..ce616cc7 100644 --- a/src/fenrir-package/commands/commands/next_char +++ b/src/fenrir-package/commands/commands/next_char @@ -8,6 +8,12 @@ class command(): if environment['screenData']['newCursorReview']['y'] == -1: environment['screenData']['newCursorReview'] = environment['screenData']['newCursor'].copy() wrappedLines = environment['screenData']['newContentText'].split('\n') + if environment['screenData']['newCursorReview']['x'] + 1 = len(wrappedLines[environment['screenData']['newCursorReview']['y']): + if environment['screenData']['newCursorReview']['y'] +1 < len(wrappedLines) - 1: + environment['screenData']['newCursorReview']['y'] += 1 + environment['screenData']['newCursorReview']['x'] = 0 + else: + environment['screenData']['newCursorReview']['x'] += 1 if wrappedLines[environment['screenData']['newCursorReview']['y']][environment['screenData']['newCursorReview']['x']].strip(" \t\n") == '': environment['runtime']['outputManager'].presentText(environment, "blank") else: