fix: popup when highlighting was cancelled (#2678)

Popup was caused by old code that set the interrupt flag when the
exception was caught in the thread and was already fixed in the code
folding branch.
This commit is contained in:
paxcut
2026-03-09 21:46:51 -07:00
committed by GitHub
parent 257d122a9f
commit fbd6d6b9fc
2 changed files with 1 additions and 8 deletions

View File

@@ -2556,10 +2556,7 @@ namespace hex::plugin::builtin {
}
} catch (const std::out_of_range &e) {
log::debug("TextHighlighter::highlightSourceCode: Out of range error: {}", e.what());
m_viewPatternEditor->interrupt();
return;
}
return;
}
}
}

View File

@@ -1479,11 +1479,7 @@ namespace hex::plugin::builtin {
interrupt();
else if (m_runningHighlighters == 0 && m_changesWereParsed && !m_changesWereColored && !m_allStepsCompleted) {
m_textHighlighter.get(provider).setViewPatternEditor(this);
try {
m_textHighlighter.get(provider).updateRequiredInputs();
} catch (...) {
}
TaskManager::createBackgroundTask("HighlightSourceCode", [this,provider](auto &) { m_textHighlighter.get(provider).highlightSourceCode(); });
} else if (m_changesWereColored && !m_allStepsCompleted) {
m_textHighlighter.get(provider).setRequestedIdentifierColors();