mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-01 21:17:44 -05:00
fix: imported patterns used for inheritance were not highlighted. (#2356)
The problem was that imported files didn't have token sequences to obtain the UDT variables. The fix was to create maps from the file name to the token sequence and then process each imported file to obtain all the variables needed. Function variables are skipped since they can be part of the code. There are also some minor code style corrections and a fix in the text editor where the last line of a selection was not being deleted.
This commit is contained in:
2
lib/external/pattern_language
vendored
2
lib/external/pattern_language
vendored
Submodule lib/external/pattern_language updated: 44cbfa2454...06874c2e87
@@ -257,10 +257,12 @@ void TextEditor::DeleteRange(const Coordinates &aStart, const Coordinates &aEnd)
|
||||
auto &firstLine = mLines[start.mLine];
|
||||
auto &lastLine = mLines[end.mLine];
|
||||
|
||||
if (startIndex < (int)firstLine.size())
|
||||
if (startIndex <= (int)firstLine.size())
|
||||
firstLine.erase(firstLine.begin() + startIndex, -1);
|
||||
if (endIndex < (int)lastLine.size())
|
||||
if (endIndex <= (int)lastLine.size())
|
||||
lastLine.erase(lastLine.begin(), endIndex);
|
||||
else
|
||||
lastLine.erase(lastLine.begin(), -1);
|
||||
|
||||
if (!lastLine.empty()) {
|
||||
firstLine.insert(firstLine.end(), lastLine.begin(), lastLine.end());
|
||||
|
||||
Reference in New Issue
Block a user