- fix: "check when open/save" and "check when caret line changed" in Options Dialog / Editor / Syntax Check don't work

This commit is contained in:
Roy Qu 2022-11-07 17:03:46 +08:00
parent ef1fbf3d8b
commit a4ef5c6987
1 changed files with 6 additions and 3 deletions

View File

@ -284,7 +284,8 @@ bool Editor::save(bool force, bool doReparse) {
if (doReparse && isVisible()) {
reparse(false);
checkSyntaxInBack();
if (pSettings->editor().syntaxCheckWhenSave())
checkSyntaxInBack();
reparseTodo();
}
return true;
@ -396,7 +397,8 @@ bool Editor::saveAs(const QString &name, bool fromProject){
reparse(false);
checkSyntaxInBack();
if (pSettings->editor().syntaxCheckWhenSave())
checkSyntaxInBack();
reparseTodo();
if (!shouldOpenInReadonly()) {
@ -1579,7 +1581,8 @@ void Editor::onStatusChanged(QSynedit::StatusChanges changes)
mCurrentLineModified = false;
if (!changes.testFlag(QSynedit::StatusChange::scOpenFile)) {
reparse(false);
checkSyntaxInBack();
if (pSettings->editor().syntaxCheckWhenLineChanged())
checkSyntaxInBack();
reparseTodo();
}
// if (pSettings->codeCompletion().clearWhenEditorHidden()