Update 62000-spell_check.py
This commit is contained in:
parent
d0c883fc0d
commit
8acba5e053
@ -28,12 +28,15 @@ class command():
|
|||||||
return 'No Description found'
|
return 'No Description found'
|
||||||
|
|
||||||
def updateSpellLanguage(self):
|
def updateSpellLanguage(self):
|
||||||
|
if not initialized:
|
||||||
|
self.env['runtime']['outputManager'].presentText('pychant is not installed', interrupt=True)
|
||||||
|
return
|
||||||
self.spellChecker = enchant.Dict(self.env['runtime']['settingsManager'].getSetting('general', 'spellCheckLanguage'))
|
self.spellChecker = enchant.Dict(self.env['runtime']['settingsManager'].getSetting('general', 'spellCheckLanguage'))
|
||||||
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:
|
if not initialized:
|
||||||
return
|
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():
|
||||||
@ -42,7 +45,7 @@ class command():
|
|||||||
try:
|
try:
|
||||||
self.updateSpellLanguage()
|
self.updateSpellLanguage()
|
||||||
except:
|
except:
|
||||||
return
|
return
|
||||||
|
|
||||||
# just when horizontal 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():
|
||||||
|
Loading…
Reference in New Issue
Block a user