1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-25 11:08:02 +02:00

Fixed a crash when doing a fixit in a split window

This commit is contained in:
Brian Fiete 2020-02-02 05:30:56 -08:00
parent ca64ea1f28
commit a296eb0f49

View file

@ -912,7 +912,7 @@ namespace Beefy.widgets
#unwarn #unwarn
int cursorPos = CursorTextPos; int cursorPos = CursorTextPos;
if (mCursorTextPos >= index) if (mCursorTextPos >= index)
mCursorTextPos += (int32)ofs; mCursorTextPos = Math.Clamp(mCursorTextPos + (int32)ofs, 0, mData.mTextLength + 1);
if (HasSelection()) if (HasSelection())
{ {
if (((ofs > 0) && (mSelection.mValue.mStartPos >= index)) || if (((ofs > 0) && (mSelection.mValue.mStartPos >= index)) ||