From 4502f8321aea13ef0d921c24b2d8720fd9d56b7e Mon Sep 17 00:00:00 2001 From: Chrys Date: Wed, 19 May 2021 21:52:06 +0200 Subject: [PATCH] make beep work with empty line --- .../onCursorChange/68000-auto_identation_horizontal.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/fenrirscreenreader/commands/onCursorChange/68000-auto_identation_horizontal.py b/src/fenrirscreenreader/commands/onCursorChange/68000-auto_identation_horizontal.py index ec961610..5cfd6ad2 100644 --- a/src/fenrirscreenreader/commands/onCursorChange/68000-auto_identation_horizontal.py +++ b/src/fenrirscreenreader/commands/onCursorChange/68000-auto_identation_horizontal.py @@ -28,7 +28,9 @@ class command(): # is a vertical change? if not self.env['runtime']['cursorManager'].isCursorHorizontalMove(): return - currIdent, y, currLine = line_utils.getCurrentLine(self.env['screen']['newCursor']['x'], self.env['screen']['newCursor']['y'], self.env['screen']['newContentText']) + x, y, currLine = line_utils.getCurrentLine(self.env['screen']['newCursor']['x'], self.env['screen']['newCursor']['y'], self.env['screen']['newContentText']) + currIdent = self.env['screen']['newCursor']['x'] + if not currLine.isspace(): # ident lastIdent, lastY, lastLine = line_utils.getCurrentLine(self.env['screen']['newCursor']['x'], self.env['screen']['newCursor']['y'], self.env['screen']['oldContentText']) @@ -49,7 +51,6 @@ class command(): if self.env['runtime']['settingsManager'].getSettingAsInt('general', 'autoPresentIndentMode') in [0,2]: if self.lastIdent != currIdent: self.env['runtime']['outputManager'].presentText(_('indented ') + str(currIdent) + ' ', interrupt=False, flush=False) - self.lastIdent = currIdent def setCallback(self, callback): pass