diff --git a/NEWS.md b/NEWS.md index 4703a440..4ce700e9 100644 --- a/NEWS.md +++ b/NEWS.md @@ -20,6 +20,7 @@ Red Panda C++ Version 1.0.0 - fix: redo cut with no selection while make whole line selected - fix: correctly reset caret when redo cut with no selection - enhancement: close editor when middle button clicked on it's title tab + - fix: error when insert text in column mode Red Panda C++ Version 0.14.5 - fix: the "gnu c++ 20" option in compiler set options is wrong diff --git a/RedPandaIDE/qsynedit/SynEdit.cpp b/RedPandaIDE/qsynedit/SynEdit.cpp index a7cb13bc..0d88c8bb 100644 --- a/RedPandaIDE/qsynedit/SynEdit.cpp +++ b/RedPandaIDE/qsynedit/SynEdit.cpp @@ -2836,13 +2836,13 @@ void SynEdit::doCutToClipboard() } internalDoCopyToClipboard(selText()); doSetSelText(""); + mUndoList->EndBlock(); mUndoList->AddChange( SynChangeReason::crNothing, BufferCoord{0,0}, BufferCoord{0,0}, "", SynSelectionMode::smNormal); - mUndoList->EndBlock(); } void SynEdit::doCopyToClipboard() @@ -5340,7 +5340,7 @@ int SynEdit::insertTextByColumnMode(const QString &Value, bool AddToUndoList) do { P = GetEOL(Value,Start); if (P != Start) { - Str = Value.mid(0,P-Start); + Str = Value.mid(Start,P-Start); // Move(Start^, Str[1], P - Start); if (mCaretY > mLines->count()) { Result++;