1
0
mirror of synced 2024-11-12 02:00:52 +01:00

patterns: Updated pattern language

This commit is contained in:
WerWolv 2023-07-30 00:44:09 +02:00
parent 4ae55f69e1
commit 2e5a51bb05
4 changed files with 16 additions and 8 deletions

View File

@ -202,8 +202,6 @@ void TextEditor::DeleteRange(const Coordinates &aStart, const Coordinates &aEnd)
}
int TextEditor::InsertTextAt(Coordinates & /* inout */ aWhere, const char *aValue) {
assert(!mReadOnly);
int cindex = GetCharacterIndex(aWhere);
int totalLines = 0;
while (*aValue != '\0') {
@ -541,8 +539,6 @@ void TextEditor::RemoveLine(int aIndex) {
}
TextEditor::Line &TextEditor::InsertLine(int aIndex) {
assert(!mReadOnly);
auto &result = *mLines.insert(mLines.begin() + aIndex, Line());
ErrorMarkers etmp;

@ -1 +1 @@
Subproject commit d5660b1d3038c02cc50f70e385c015fa47d1bc4c
Subproject commit dfe0da877f89a0bc88feca5bd44b282344de9677

@ -1 +1 @@
Subproject commit f0445612925a957cb6da075d37128b718ce3ea0f
Subproject commit 244da18450cdcab432cd1cf13e83472ccd0a9fba

View File

@ -306,8 +306,20 @@ namespace hex::plugin::builtin {
if (this->m_consoleNeedsUpdate) {
std::scoped_lock lock(this->m_logMutex);
this->m_consoleEditor.SetTextLines(*this->m_console);
this->m_consoleEditor.SetCursorPosition({ int(this->m_consoleEditor.GetTextLines().size()), 0 });
auto lineCount = this->m_consoleEditor.GetTextLines().size() - 1;
if (this->m_console->size() < lineCount) {
this->m_consoleEditor.SetText("");
lineCount = 0;
}
this->m_consoleEditor.SetCursorPosition({ int(lineCount + 1), 0 });
auto linesToAdd = this->m_console->size() - lineCount;
for (size_t i = 0; i < linesToAdd; i += 1) {
this->m_consoleEditor.InsertText(this->m_console->at(lineCount + i));
this->m_consoleEditor.InsertText("\n");
}
this->m_consoleNeedsUpdate = false;
}