🎨 Supports setting the spell check language on desktop https://github.com/siyuan-note/siyuan/issues/16524

Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2025-12-08 17:10:21 +08:00
parent b8a937b3f1
commit 2e40a53802
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 8 additions and 2 deletions

View file

@ -240,8 +240,8 @@ func InitConf() {
if nil == Conf.Editor {
Conf.Editor = defaultEditor
}
// 新增字段的默认值
// 使用指针类型来区分字段不存在nil和用户设置为 0非 nil
// 新增字段的默认值,使用指针类型来区分字段不存在nil和用户设置为 0非 nil
if nil == Conf.Editor.BacklinkSort {
Conf.Editor.BacklinkSort = defaultEditor.BacklinkSort
}
@ -282,6 +282,9 @@ func InitConf() {
if conf.MinDynamicLoadBlocks > Conf.Editor.DynamicLoadBlocks {
Conf.Editor.DynamicLoadBlocks = conf.MinDynamicLoadBlocks
}
if "" == Conf.Editor.SpellcheckLanguage {
Conf.Editor.SpellcheckLanguage = "en-US"
}
if 0 > Conf.Editor.BacklinkExpandCount {
Conf.Editor.BacklinkExpandCount = 0
}