1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 20:42:21 +02:00

Fixed cursor movement when deleting chars while renaming symbols

This commit is contained in:
Brian Fiete 2025-01-25 17:42:08 -08:00
parent 0c9374cfa2
commit 474bad09b2

View file

@ -719,7 +719,8 @@ namespace IDE.ui
editWidgetContent.mData.mUndoManager.Add(insertTextAction);
editWidgetContent.PhysInsertAtCursor(newStr, false);
if (spanStart < cursorPos)
if (((strLenDiff > 0) && (spanStart + strLenDiff < cursorPos)) ||
((strLenDiff < 0) && (spanStart + strLenDiff <= cursorPos)))
cursorPos += strLenDiff;
}