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

Fix for WantX after deleting selection

This commit is contained in:
Brian Fiete 2020-10-12 17:49:22 -07:00
parent ddad5bd492
commit 14609dc636

View file

@ -874,7 +874,10 @@ namespace Beefy.widgets
if (endIdx != startIdx) if (endIdx != startIdx)
ContentChanged(); ContentChanged();
if (moveCursor) if (moveCursor)
EnsureCursorVisible(); {
EnsureCursorVisible();
ResetWantX();
}
} }
public virtual void DeleteSelection(bool moveCursor = true) public virtual void DeleteSelection(bool moveCursor = true)
@ -2542,7 +2545,9 @@ namespace Beefy.widgets
} }
if (!CheckReadOnly()) if (!CheckReadOnly())
{
DeleteChar(); DeleteChar();
}
mCursorImplicitlyMoved = true; mCursorImplicitlyMoved = true;
break; break;
default: default:
@ -2859,7 +2864,7 @@ namespace Beefy.widgets
} }
// We used to have a split between PhysCursorMoved and CursorMoved. CursorMoved has a "ResetWantX" and was non-virtual... uh- // We used to have a split between PhysCursorMoved and CursorMoved. CursorMoved has a "ResetWantX" and was non-virtual... uh-
// so what was taht for? // so what was that for?
public virtual void PhysCursorMoved() public virtual void PhysCursorMoved()
{ {
mJustInsertedCharPair = false; mJustInsertedCharPair = false;