1
0
mirror of synced 2024-11-24 15:50:16 +01:00

fix: Text editors highlighting doc comments when they shouldn't

This commit is contained in:
WerWolv 2024-02-25 12:35:01 +01:00
parent 7434fdec6f
commit 4f72c60eb0
2 changed files with 18 additions and 7 deletions

View File

@ -31,6 +31,13 @@ namespace hex::plugin::builtin {
auto languageDef = TextEditor::LanguageDefinition();
for (auto &[name, identifier] : languageDef.mIdentifiers)
identifier.mDeclaration = "";
languageDef.mCaseSensitive = false;
languageDef.mAutoIndentation = false;
languageDef.mCommentStart = "";
languageDef.mCommentEnd = "";
languageDef.mSingleLineComment = "";
languageDef.mDocComment = "";
languageDef.mGlobalDocComment = "";
responseEditor.SetLanguageDefinition(languageDef);

View File

@ -124,6 +124,8 @@ namespace hex::plugin::builtin {
langDef.mCommentStart = "";
langDef.mCommentEnd = "";
langDef.mSingleLineComment = "";
langDef.mDocComment = "";
langDef.mGlobalDocComment = "";
initialized = true;
}
@ -1589,14 +1591,16 @@ namespace hex::plugin::builtin {
std::scoped_lock lock(m_logMutex);
for (auto line : wolv::util::splitString(message, "\n")) {
switch (level) {
using enum pl::core::LogConsole::Level;
if (!wolv::util::trim(line).empty()) {
switch (level) {
using enum pl::core::LogConsole::Level;
case Debug: line = hex::format("D: {}", line); break;
case Info: line = hex::format("I: {}", line); break;
case Warning: line = hex::format("W: {}", line); break;
case Error: line = hex::format("E: {}", line); break;
default: break;
case Debug: line = hex::format("D: {}", line); break;
case Info: line = hex::format("I: {}", line); break;
case Warning: line = hex::format("W: {}", line); break;
case Error: line = hex::format("E: {}", line); break;
default: break;
}
}
m_console->emplace_back(line);