- fix: Wrong selection position after delete in column mode.

This commit is contained in:
Roy Qu 2023-02-15 20:49:42 +08:00
parent 6068f70d61
commit 0bedb63fa2
2 changed files with 5 additions and 0 deletions

View File

@ -25,6 +25,7 @@ Red Panda C++ Version 2.12
- fix: Can't correctly create project, if template's encoding setting is not valid.
- enhancement: New "embed assembly" template.
- enhancement: New "Hello GAS" and "GAS and C" templates for linux and win64.
- fix: Wrong selection position after delete in column mode.
Red Panda C++ Version 2.11

View File

@ -5355,7 +5355,11 @@ void QSynEdit::doDeleteText(BufferCoord startPos, BufferCoord endPos, SelectionM
properSetLine(i,s);
}
// Lines never get deleted completely, so keep caret at end.
startPos.ch = columnToChar(startPos.line,ColFrom);
endPos.ch = columnToChar(endPos.line, ColFrom);
internalSetCaretXY(startPos);
setBlockBegin(startPos);
setBlockEnd(endPos);
// Column deletion never removes a line entirely, so no mark
// updating is needed here.
break;