mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-28 07:47:03 -05:00
fix: template argument delimiters failed to create folds.
The problem was using the identifier type to distinguish template delimiters from operators because types are not guaranteed to be set. The fix uses colors of the highlighting instead which should always be set when the folds are detected.
This commit is contained in:
@@ -379,7 +379,8 @@ namespace hex::ui {
|
||||
return m_foldPoints;
|
||||
}
|
||||
next(-1);
|
||||
if (const auto *identifier = const_cast<Token::Identifier *>(getValue<Token::Identifier>(0)); identifier == nullptr || identifier->getType() != Token::Identifier::IdentifierType::UDT) {
|
||||
auto column = m_curr[0].location.column - 1;
|
||||
if (line.m_colors[column] != (char) PaletteIndex::UserDefinedType) {
|
||||
next(2);
|
||||
if (peek(tkn::Separator::EndOfProgram, -1)) {
|
||||
return m_foldPoints;
|
||||
|
||||
Reference in New Issue
Block a user