From 67551a83f827165fdb2d2b2bd3c6a0fbfdaaa99f Mon Sep 17 00:00:00 2001 From: chrys Date: Sat, 24 Mar 2018 21:11:52 +0100 Subject: [PATCH] cleanup indention speak --- .../55000-present_line_if_cursor_change_vertical.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/fenrirscreenreader/commands/onCursorChange/55000-present_line_if_cursor_change_vertical.py b/src/fenrirscreenreader/commands/onCursorChange/55000-present_line_if_cursor_change_vertical.py index 897f6f88..5075b05f 100644 --- a/src/fenrirscreenreader/commands/onCursorChange/55000-present_line_if_cursor_change_vertical.py +++ b/src/fenrirscreenreader/commands/onCursorChange/55000-present_line_if_cursor_change_vertical.py @@ -40,17 +40,16 @@ class command(): currIdent = len(currLine) - len(currLine.lstrip()) if self.lastIdent == -1: self.lastIdent = currIdent + doInterrupt = True if self.env['runtime']['settingsManager'].getSettingAsBool('general', 'autoPresentIndent'): - doInterrupt = True if self.lastIdent < currIdent: self.env['runtime']['outputManager'].presentText(_('indented ') + str(currIdent - self.lastIdent) + ' ', interrupt=doInterrupt, flush=False) doInterrupt = False - if self.lastIdent > currIdent: + elif self.lastIdent > currIdent: self.env['runtime']['outputManager'].presentText(_('outdented ') + str(self.lastIdent - currIdent) + ' ', interrupt=doInterrupt, flush=False) doInterrupt = False - self.env['runtime']['outputManager'].presentText(currLine, interrupt=doInterrupt, flush=False) - else: - self.env['runtime']['outputManager'].presentText(currLine, interrupt=True, flush=False) + + self.env['runtime']['outputManager'].presentText(currLine, interrupt=doInterrupt, flush=False) self.lastIdent = currIdent def setCallback(self, callback): pass