add gui.set_syntax_styles

This commit is contained in:
MihailRis
2025-11-23 18:10:06 +03:00
parent 1676c47093
commit 50f6c48771
11 changed files with 149 additions and 43 deletions
+3 -1
View File
@@ -918,7 +918,9 @@ void TextBox::onTab(bool shiftPressed) {
void TextBox::refreshSyntax() {
if (!syntax.empty()) {
const auto& processor = gui.getEditor().getSyntaxProcessor();
if (auto styles = processor.highlight(syntax, input)) {
auto scheme = gui.getSyntaxColorScheme();
if (auto styles =
processor.highlight(scheme ? *scheme : FontStylesScheme {}, syntax, input)) {
label->setStyles(std::move(styles));
}
}