Skip to content

Commit d62b64c

Browse files
authored
Fixes for next release. (WerWolv#2430)
I forgot I also had comments switched to italics done easily thanks to WerWolv's addition that lets you push and pop them.
1 parent 5295265 commit d62b64c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

plugins/ui/source/ui/text_editor/render.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "imgui.h"
2+
#include "fonts/fonts.hpp"
23
#include <ui/text_editor.hpp>
34
#include <algorithm>
45

@@ -530,8 +531,12 @@ namespace hex::ui {
530531
auto textStart = textDistanceToLineStart(lineStart);
531532
auto begin = lineStartScreenPos + ImVec2(textStart, 0);
532533

534+
if (color <= (char) TextEditor::PaletteIndex::Comment && color >= (char) TextEditor::PaletteIndex::DocComment)
535+
fonts::CodeEditor().pushItalic();
533536
TextUnformattedColoredAt(begin, m_palette[(i32) color], line.substr(i, tokenLength).c_str());
534537

538+
if (color <= (char) TextEditor::PaletteIndex::Comment && color >= (char) TextEditor::PaletteIndex::DocComment)
539+
fonts::CodeEditor().pop();
535540
ErrorMarkers::iterator errorIt;
536541
auto key = lineStart + Coordinates(1, 1);
537542
if (errorIt = m_errorMarkers.find(key); errorIt != m_errorMarkers.end()) {

0 commit comments

Comments
 (0)