Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit bd77de9

Browse files
Fixing logic
1 parent d9de8f6 commit bd77de9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/GitHub.UI/Controls/AutoCompleteBox/AutoCompleteTextInputExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ public static string GetExpandedText(this IAutoCompleteTextInput textInput, stri
2525

2626
var currentText = textInput.Text ?? ""; // Playing it safe
2727

28-
if(offset <= currentText.Length) throw new InvalidOperationException("The offset can't be larger than the current text length");
29-
if(afterIndex <= currentText.Length) throw new InvalidOperationException("The afterIndex can't be larger than the current text length");
28+
if (offset > currentText.Length) throw new InvalidOperationException("The offset can't be larger than the current text length");
29+
if (afterIndex > currentText.Length) throw new InvalidOperationException("The afterIndex can't be larger than the current text length");
3030

3131
var before = currentText.Substring(0, offset);
3232
var after = currentText.Substring(afterIndex);

0 commit comments

Comments
 (0)