From 3f9880097c3ef97323d37fbd88b1f1b1563155ff Mon Sep 17 00:00:00 2001 From: chrys Date: Sun, 28 Aug 2016 21:58:51 +0200 Subject: [PATCH] improve output of exit_review --- config/keyboard/test.conf | 6 +++--- src/fenrir-package/commands/commands/exit_review.py | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/config/keyboard/test.conf b/config/keyboard/test.conf index 06361610..eb0f6999 100644 --- a/config/keyboard/test.conf +++ b/config/keyboard/test.conf @@ -11,9 +11,9 @@ 1-FENRIR,1-KEY_KP3=next_char 1-FENRIR,1-KEY_KPDOT=exit_review 1-FENRIR,1-KEY_J=cursor_position -#=curr_screen -#=curr_screen_before_cursor -#=curr_screen_after_cursor +1-FENRIR,1-KEY_U=curr_screen +1-FENRIR,1-KEY_I=curr_screen_before_cursor +1-FENRIR,1-KEY_O=curr_screen_after_cursor 1-FENRIR,1-KEY_P=indent_curr_line #=last_incomming 1-FENRIR,1-KEY_F2=toggle_braille diff --git a/src/fenrir-package/commands/commands/exit_review.py b/src/fenrir-package/commands/commands/exit_review.py index e08e1bc1..fe272749 100644 --- a/src/fenrir-package/commands/commands/exit_review.py +++ b/src/fenrir-package/commands/commands/exit_review.py @@ -4,6 +4,11 @@ class command(): def __init__(self): pass def run(self, environment): + if (environment['screenData']['oldCursorReview'] == None) and \ + (environment['screenData']['newCursorReview'] == None): + environment['runtime']['outputManager'].presentText(environment, "Not in review mode", interrupt=True) + return environment + environment['screenData']['oldCursorReview'] = None environment['screenData']['newCursorReview'] = None environment['runtime']['outputManager'].presentText(environment, "leve review mode", interrupt=True)