- fix: error when insert text in column mode

This commit is contained in:
Roy Qu 2022-03-15 13:44:18 +08:00
parent b56f549cf4
commit 469c5f21d3
2 changed files with 3 additions and 2 deletions

View File

@ -20,6 +20,7 @@ Red Panda C++ Version 1.0.0
- fix: redo cut with no selection while make whole line selected - fix: redo cut with no selection while make whole line selected
- fix: correctly reset caret when redo cut with no selection - fix: correctly reset caret when redo cut with no selection
- enhancement: close editor when middle button clicked on it's title tab - 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 Red Panda C++ Version 0.14.5
- fix: the "gnu c++ 20" option in compiler set options is wrong - fix: the "gnu c++ 20" option in compiler set options is wrong

View File

@ -2836,13 +2836,13 @@ void SynEdit::doCutToClipboard()
} }
internalDoCopyToClipboard(selText()); internalDoCopyToClipboard(selText());
doSetSelText(""); doSetSelText("");
mUndoList->EndBlock();
mUndoList->AddChange( mUndoList->AddChange(
SynChangeReason::crNothing, SynChangeReason::crNothing,
BufferCoord{0,0}, BufferCoord{0,0},
BufferCoord{0,0}, BufferCoord{0,0},
"", "",
SynSelectionMode::smNormal); SynSelectionMode::smNormal);
mUndoList->EndBlock();
} }
void SynEdit::doCopyToClipboard() void SynEdit::doCopyToClipboard()
@ -5340,7 +5340,7 @@ int SynEdit::insertTextByColumnMode(const QString &Value, bool AddToUndoList)
do { do {
P = GetEOL(Value,Start); P = GetEOL(Value,Start);
if (P != Start) { if (P != Start) {
Str = Value.mid(0,P-Start); Str = Value.mid(Start,P-Start);
// Move(Start^, Str[1], P - Start); // Move(Start^, Str[1], P - Start);
if (mCaretY > mLines->count()) { if (mCaretY > mLines->count()) {
Result++; Result++;