tweaks
This commit is contained in:
parent
2cb2609cc8
commit
cb5a96eb41
@ -32,19 +32,19 @@ class command():
|
|||||||
self.language = self.env['runtime']['settingsManager'].getSetting('general', 'spellCheckLanguage')
|
self.language = self.env['runtime']['settingsManager'].getSetting('general', 'spellCheckLanguage')
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
|
if not initialized:
|
||||||
|
return
|
||||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('general', 'autoSpellCheck'):
|
if not self.env['runtime']['settingsManager'].getSettingAsBool('general', 'autoSpellCheck'):
|
||||||
return
|
return
|
||||||
if self.env['runtime']['inputManager'].noKeyPressed():
|
if self.env['runtime']['inputManager'].noKeyPressed():
|
||||||
return
|
return
|
||||||
if not initialized:
|
|
||||||
return
|
|
||||||
if self.env['runtime']['settingsManager'].getSetting('general', 'spellCheckLanguage') != self.language:
|
if self.env['runtime']['settingsManager'].getSetting('general', 'spellCheckLanguage') != self.language:
|
||||||
try:
|
try:
|
||||||
self.updateSpellLanguage()
|
self.updateSpellLanguage()
|
||||||
except:
|
except:
|
||||||
return
|
return
|
||||||
|
|
||||||
# just when cursor move worddetection is needed
|
# just when horizontal cursor move worddetection is needed
|
||||||
if not self.env['runtime']['cursorManager'].isCursorHorizontalMove():
|
if not self.env['runtime']['cursorManager'].isCursorHorizontalMove():
|
||||||
return
|
return
|
||||||
|
|
||||||
@ -77,9 +77,7 @@ class command():
|
|||||||
if (x + len(currWord) != self.env['screenData']['newCursor']['x']) and \
|
if (x + len(currWord) != self.env['screenData']['newCursor']['x']) and \
|
||||||
(x + len(currWord) != self.env['screenData']['newCursor']['x']-1):
|
(x + len(currWord) != self.env['screenData']['newCursor']['x']-1):
|
||||||
return
|
return
|
||||||
# ignore empty
|
|
||||||
if currWord.strip(string.whitespace) =='':
|
|
||||||
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:
|
||||||
if not newContent[self.env['screenData']['oldCursor']['x'] - 1].lower() in string.ascii_lowercase:
|
if not newContent[self.env['screenData']['oldCursor']['x'] - 1].lower() in string.ascii_lowercase:
|
||||||
|
Loading…
Reference in New Issue
Block a user