mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-27 23:37:05 -05:00
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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user