fix: don't clear symbol table when minimized

This commit is contained in:
Roy Qu 2022-08-27 11:07:48 +08:00
parent d438864a4d
commit ca4687c7cd
2 changed files with 8 additions and 6 deletions

View File

@ -1279,10 +1279,10 @@ void Editor::closeEvent(QCloseEvent *)
void Editor::showEvent(QShowEvent */*event*/)
{
if (pSettings->codeCompletion().clearWhenEditorHidden()
&& !inProject()) {
initParser();
}
// if (pSettings->codeCompletion().clearWhenEditorHidden()
// && !inProject()) {
//// initParser();
// }
if (mParser && !pMainWindow->isClosingAll()
&& !pMainWindow->isQuitting()
&& !mParser->isFileParsed(mFilename)
@ -1311,8 +1311,10 @@ void Editor::hideEvent(QHideEvent */*event*/)
&SynEdit::invalidate);
}
if (pSettings->codeCompletion().clearWhenEditorHidden()
&& !inProject() && mParser)
&& !inProject() && mParser
&& !pMainWindow->isMinimized()) {
mParser->reset();
}
setHideTime(QDateTime::currentDateTime());
}

View File

@ -3886,7 +3886,7 @@ void Settings::CodeCompletion::doLoad()
statex.dwLength = sizeof (statex);
GlobalMemoryStatusEx (&statex);
if (statex.ullAvailPhys > (long long int)3*1024*1024*1024) {
if (statex.ullAvailPhys > (long long int)10*1024*1024*1024) {
doClear = false;
}
#endif