mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-24 22:34:54 +02:00
Fix deleting in column mode also delete an unexpected EOL
Fix #14426, close #14536
This commit is contained in:
parent
19c6489a9a
commit
dc6f6d1103
@ -592,17 +592,20 @@ LRESULT ScintillaEditView::scintillaNew_Proc(HWND hwnd, UINT Message, WPARAM wPa
|
|||||||
if (nbCaseForScint)
|
if (nbCaseForScint)
|
||||||
_callWindowProc(_scintillaDefaultProc, hwnd, Message, wParam, lParam);
|
_callWindowProc(_scintillaDefaultProc, hwnd, Message, wParam, lParam);
|
||||||
|
|
||||||
// then do our job, if any
|
// then do our job, if it's not column mode
|
||||||
for (const auto& i : edgeOfEol)
|
if (!isColumnSelection)
|
||||||
{
|
{
|
||||||
// because the current caret modification will change the other caret positions,
|
for (const auto& i : edgeOfEol)
|
||||||
// so we get them dynamically in the loop.
|
{
|
||||||
LRESULT posStart = execute(SCI_GETSELECTIONNSTART, i._selIndex);
|
// because the current caret modification will change the other caret positions,
|
||||||
LRESULT posEnd = execute(SCI_GETSELECTIONNEND, i._selIndex);
|
// so we get them dynamically in the loop.
|
||||||
|
LRESULT posStart = execute(SCI_GETSELECTIONNSTART, i._selIndex);
|
||||||
|
LRESULT posEnd = execute(SCI_GETSELECTIONNEND, i._selIndex);
|
||||||
|
|
||||||
replaceTarget(L"", posStart, posEnd + i._len2remove);
|
replaceTarget(L"", posStart, posEnd + i._len2remove);
|
||||||
execute(SCI_SETSELECTIONNSTART, i._selIndex, posStart);
|
execute(SCI_SETSELECTIONNSTART, i._selIndex, posStart);
|
||||||
execute(SCI_SETSELECTIONNEND, i._selIndex, posStart);
|
execute(SCI_SETSELECTIONNEND, i._selIndex, posStart);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
execute(SCI_ENDUNDOACTION);
|
execute(SCI_ENDUNDOACTION);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user