Fixes for next release. (#2430)

I forgot I also had comments switched to italics done easily thanks to
WerWolv's addition that lets you push and pop them.
This commit is contained in:
paxcut 2025-09-02 17:29:33 -07:00 committed by GitHub
parent 52952652de
commit d62b64c27a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -1,4 +1,5 @@
#include "imgui.h"
#include "fonts/fonts.hpp"
#include <ui/text_editor.hpp>
#include <algorithm>
@ -530,8 +531,12 @@ namespace hex::ui {
auto textStart = textDistanceToLineStart(lineStart);
auto begin = lineStartScreenPos + ImVec2(textStart, 0);
if (color <= (char) TextEditor::PaletteIndex::Comment && color >= (char) TextEditor::PaletteIndex::DocComment)
fonts::CodeEditor().pushItalic();
TextUnformattedColoredAt(begin, m_palette[(i32) color], line.substr(i, tokenLength).c_str());
if (color <= (char) TextEditor::PaletteIndex::Comment && color >= (char) TextEditor::PaletteIndex::DocComment)
fonts::CodeEditor().pop();
ErrorMarkers::iterator errorIt;
auto key = lineStart + Coordinates(1, 1);
if (errorIt = m_errorMarkers.find(key); errorIt != m_errorMarkers.end()) {