A fix for a fix.

- tab character is actually 3 'ordinary' characters if it's at end of line, and 4 elsewhere
This commit is contained in:
Artyom Shalkhakov 2025-02-21 00:30:58 -07:00
parent 2bc7efa4db
commit a2e8549052

View file

@ -2188,8 +2188,16 @@ void TextEditor::Backspace()
u.mRemovedStart = u.mRemovedEnd = GetActualCursorCoordinates();
if (line[cindex].mChar == '\t')
{
u.mRemovedStart.mColumn -= mTabSize;
mState.mCursorPosition.mColumn -= mTabSize;
if (pos.mColumn == GetLineMaxColumn(pos.mLine))
{
u.mRemovedStart.mColumn -= mTabSize - 1;
mState.mCursorPosition.mColumn -= mTabSize - 1;
}
else
{
u.mRemovedStart.mColumn -= mTabSize;
mState.mCursorPosition.mColumn -= mTabSize;
}
}
else
{