1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-07-14 20:23:51 +02:00

Merge pull request #2276 from kallisto56/master

Fix cursor swap in `QuickFind.SelectAllMatches()`
This commit is contained in:
Brian Fiete 2025-07-11 03:52:31 -07:00 committed by GitHub
commit 266711c05a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -279,7 +279,7 @@ namespace IDE.ui
bool Matches(int32 idx) bool Matches(int32 idx)
{ {
if (idx + findText.Length >= ewc.mData.mTextLength) if (idx + findText.Length > ewc.mData.mTextLength)
return false; return false;
for (var i = 0; i < findText.Length; i++) for (var i = 0; i < findText.Length; i++)
@ -352,7 +352,7 @@ namespace IDE.ui
if (swapCursor != null) if (swapCursor != null)
{ {
Swap!(primaryCursor.mCursorTextPos, swapCursor.mCursorTextPos); Swap!(primaryCursor.mCursorTextPos, swapCursor.mCursorTextPos);
Swap!(primaryCursor.mSelection.Value, swapCursor.mSelection.Value); Swap!(primaryCursor.mSelection.ValueRef, swapCursor.mSelection.ValueRef);
} }
return (!isFirstMatch); return (!isFirstMatch);