From b36d19ca78c04774a6368ad62e1bb7a60d4fc8e7 Mon Sep 17 00:00:00 2001 From: chrys Date: Tue, 18 Oct 2016 10:46:22 +0200 Subject: [PATCH] =?UTF-8?q?do=20not=20allert=20on=20'=20and=20=C2=B4=20in?= =?UTF-8?q?=20spellchecker?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/fenrir/commands/onInput/62000-spell_check.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/fenrir/commands/onInput/62000-spell_check.py b/src/fenrir/commands/onInput/62000-spell_check.py index cf0d773a..dc93560d 100644 --- a/src/fenrir/commands/onInput/62000-spell_check.py +++ b/src/fenrir/commands/onInput/62000-spell_check.py @@ -64,17 +64,17 @@ class command(): x, y, currWord = word_utils.getCurrentWord(self.env['screenData']['newCursor']['x'], 0, newContent) # was this a typed word? if self.env['screenData']['newDelta'] != '': - if not(newContent[self.env['screenData']['oldCursor']['x']] in string.whitespace + string.punctuation and x != self.env['screenData']['oldCursor']['x']): + if not(newContent[self.env['screenData']['oldCursor']['x']] in string.whitespace + '!"#$%&()*+,-./:;<=>?@[\\]^_{|}~' and x != self.env['screenData']['oldCursor']['x']): return else: - currWord = currWord.strip(string.whitespace + string.punctuation) + currWord = currWord.strip(string.whitespace + '!"#$%&()*+,-./:;<=>?@[\\]^_{|}~') else: # or just arrow arround? if not(newContent[self.env['screenData']['newCursor']['x']].isspace() and x != self.env['screenData']['newCursor']['x']): return # ignore empty - if currWord[0] =='': + if currWord.strip(string.whitespace) =='': return # just on end of word if self.env['screenData']['newCursor']['x'] > 0: @@ -122,6 +122,7 @@ class command(): return except: pass + if not self.spellChecker.check(currWord): self.env['runtime']['outputManager'].presentText('misspelled',soundIcon='mispell', interrupt=False)