cleanup indention speak

This commit is contained in:
chrys 2018-03-24 21:11:52 +01:00
parent 9dc8287a63
commit 67551a83f8

View File

@ -40,17 +40,16 @@ class command():
currIdent = len(currLine) - len(currLine.lstrip()) currIdent = len(currLine) - len(currLine.lstrip())
if self.lastIdent == -1: if self.lastIdent == -1:
self.lastIdent = currIdent self.lastIdent = currIdent
doInterrupt = True
if self.env['runtime']['settingsManager'].getSettingAsBool('general', 'autoPresentIndent'): if self.env['runtime']['settingsManager'].getSettingAsBool('general', 'autoPresentIndent'):
doInterrupt = True
if self.lastIdent < currIdent: if self.lastIdent < currIdent:
self.env['runtime']['outputManager'].presentText(_('indented ') + str(currIdent - self.lastIdent) + ' ', interrupt=doInterrupt, flush=False) self.env['runtime']['outputManager'].presentText(_('indented ') + str(currIdent - self.lastIdent) + ' ', interrupt=doInterrupt, flush=False)
doInterrupt = 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) self.env['runtime']['outputManager'].presentText(_('outdented ') + str(self.lastIdent - currIdent) + ' ', interrupt=doInterrupt, flush=False)
doInterrupt = False doInterrupt = False
self.env['runtime']['outputManager'].presentText(currLine, interrupt=doInterrupt, flush=False)
else: self.env['runtime']['outputManager'].presentText(currLine, interrupt=doInterrupt, flush=False)
self.env['runtime']['outputManager'].presentText(currLine, interrupt=True, flush=False)
self.lastIdent = currIdent self.lastIdent = currIdent
def setCallback(self, callback): def setCallback(self, callback):
pass pass