From a80c11a6e8d2b6952b1cabf85852dd8b3d80447e Mon Sep 17 00:00:00 2001 From: frosch Date: Wed, 30 Apr 2025 21:31:52 +0200 Subject: [PATCH] Fix 66733e2a: Textbuf was broken, and did not insert any input. (#14173) --- src/textbuf.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/textbuf.cpp b/src/textbuf.cpp index eabeac919d..a35834079a 100644 --- a/src/textbuf.cpp +++ b/src/textbuf.cpp @@ -199,7 +199,7 @@ bool Textbuf::InsertString(std::string_view str, bool marked, std::optionalmarkend = 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;