diff --git a/NEWS.md b/NEWS.md index fa138df5..3330170f 100644 --- a/NEWS.md +++ b/NEWS.md @@ -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 diff --git a/libs/qsynedit/qsynedit/qsynedit.cpp b/libs/qsynedit/qsynedit/qsynedit.cpp index 306d139d..533cf0a0 100644 --- a/libs/qsynedit/qsynedit/qsynedit.cpp +++ b/libs/qsynedit/qsynedit/qsynedit.cpp @@ -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;