mirror of https://github.com/WerWolv/ImHex
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:
parent
52952652de
commit
d62b64c27a
|
|
@ -1,4 +1,5 @@
|
||||||
#include "imgui.h"
|
#include "imgui.h"
|
||||||
|
#include "fonts/fonts.hpp"
|
||||||
#include <ui/text_editor.hpp>
|
#include <ui/text_editor.hpp>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
|
|
@ -530,8 +531,12 @@ namespace hex::ui {
|
||||||
auto textStart = textDistanceToLineStart(lineStart);
|
auto textStart = textDistanceToLineStart(lineStart);
|
||||||
auto begin = lineStartScreenPos + ImVec2(textStart, 0);
|
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());
|
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;
|
ErrorMarkers::iterator errorIt;
|
||||||
auto key = lineStart + Coordinates(1, 1);
|
auto key = lineStart + Coordinates(1, 1);
|
||||||
if (errorIt = m_errorMarkers.find(key); errorIt != m_errorMarkers.end()) {
|
if (errorIt = m_errorMarkers.find(key); errorIt != m_errorMarkers.end()) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue