do not allert on ' and ´ in spellchecker
This commit is contained in:
parent
db6c21625d
commit
b36d19ca78
@ -64,17 +64,17 @@ class command():
|
|||||||
x, y, currWord = word_utils.getCurrentWord(self.env['screenData']['newCursor']['x'], 0, newContent)
|
x, y, currWord = word_utils.getCurrentWord(self.env['screenData']['newCursor']['x'], 0, newContent)
|
||||||
# was this a typed word?
|
# was this a typed word?
|
||||||
if self.env['screenData']['newDelta'] != '':
|
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
|
return
|
||||||
else:
|
else:
|
||||||
currWord = currWord.strip(string.whitespace + string.punctuation)
|
currWord = currWord.strip(string.whitespace + '!"#$%&()*+,-./:;<=>?@[\\]^_{|}~')
|
||||||
else:
|
else:
|
||||||
# or just arrow arround?
|
# or just arrow arround?
|
||||||
if not(newContent[self.env['screenData']['newCursor']['x']].isspace() and x != self.env['screenData']['newCursor']['x']):
|
if not(newContent[self.env['screenData']['newCursor']['x']].isspace() and x != self.env['screenData']['newCursor']['x']):
|
||||||
return
|
return
|
||||||
|
|
||||||
# ignore empty
|
# ignore empty
|
||||||
if currWord[0] =='':
|
if currWord.strip(string.whitespace) =='':
|
||||||
return
|
return
|
||||||
# just on end of word
|
# just on end of word
|
||||||
if self.env['screenData']['newCursor']['x'] > 0:
|
if self.env['screenData']['newCursor']['x'] > 0:
|
||||||
@ -122,6 +122,7 @@ class command():
|
|||||||
return
|
return
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
if not self.spellChecker.check(currWord):
|
if not self.spellChecker.check(currWord):
|
||||||
self.env['runtime']['outputManager'].presentText('misspelled',soundIcon='mispell', interrupt=False)
|
self.env['runtime']['outputManager'].presentText('misspelled',soundIcon='mispell', interrupt=False)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user