1
0
Fork 0

Fix 66733e2a: Textbuf was broken, and did not insert any input. (#14173)

pull/14176/head
frosch 2025-04-30 21:31:52 +02:00 committed by GitHub
parent 7dd3bed10f
commit a80c11a6e8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -199,7 +199,7 @@ bool Textbuf::InsertString(std::string_view str, bool marked, std::optional<size
this->markend = insertpos + bytes;
}
this->buf.insert(insertpos, str, bytes);
this->buf.insert(insertpos, str.substr(0, bytes));
this->chars += chars;
if (!marked && !caret.has_value()) this->caretpos += bytes;