From 92a0e71a23a92dc4e8f6d99c399df9b6690f0543 Mon Sep 17 00:00:00 2001 From: chrys87 Date: Tue, 19 Jul 2016 09:59:46 +0200 Subject: [PATCH] next_char Todo find next char --- .../commands/commands/next_char | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/fenrir-package/commands/commands/next_char diff --git a/src/fenrir-package/commands/commands/next_char b/src/fenrir-package/commands/commands/next_char new file mode 100644 index 00000000..62e8b05f --- /dev/null +++ b/src/fenrir-package/commands/commands/next_char @@ -0,0 +1,19 @@ +#!/bin/python + +class command(): + def __init__(self): + pass + def run(self, environment): + environment['screenData']['oldCursorReview'] = environment['screenData']['newCursorReview'] + if environment['screenData']['newCursorReview']['y'] == -1: + environment['screenData']['newCursorReview'] = environment['screenData']['newCursor'].copy() + wrappedLines = environment['screenData']['newContentText'].split('\n') + if wrappedLines[environment['screenData']['newCursorReview']['y']][environment['screenData']['newCursorReview']['x']].strip(" \t\n") == '': + environment['runtime']['outputManager'].presentText(environment, "blank") + else: + environment['runtime']['outputManager'].presentText(environment, wrappedLines[environment['screenData']['newCursorReview']['y']][environment['screenData']['newCursorReview']['x']]) + return environment + def setCallback(self, callback): + pass + def shutdown(self): + pass