From 2df75c697892144a431210824db96dc25d87dde1 Mon Sep 17 00:00:00 2001 From: chrys Date: Tue, 19 Jul 2016 21:32:43 +0200 Subject: [PATCH] fix char navigation --- .../commands/commands/curr_char | 19 -------------- .../commands/commands/next_char | 25 ------------------- .../commands/commands/prev_char | 25 ------------------- 3 files changed, 69 deletions(-) delete mode 100644 src/fenrir-package/commands/commands/curr_char delete mode 100644 src/fenrir-package/commands/commands/next_char delete mode 100644 src/fenrir-package/commands/commands/prev_char diff --git a/src/fenrir-package/commands/commands/curr_char b/src/fenrir-package/commands/commands/curr_char deleted file mode 100644 index 62e8b05f..00000000 --- a/src/fenrir-package/commands/commands/curr_char +++ /dev/null @@ -1,19 +0,0 @@ -#!/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 diff --git a/src/fenrir-package/commands/commands/next_char b/src/fenrir-package/commands/commands/next_char deleted file mode 100644 index ce616cc7..00000000 --- a/src/fenrir-package/commands/commands/next_char +++ /dev/null @@ -1,25 +0,0 @@ -#!/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 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: - 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 diff --git a/src/fenrir-package/commands/commands/prev_char b/src/fenrir-package/commands/commands/prev_char deleted file mode 100644 index b9f9842b..00000000 --- a/src/fenrir-package/commands/commands/prev_char +++ /dev/null @@ -1,25 +0,0 @@ -#!/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 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") == '': - 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