Skip to content

Commit 00e7476

Browse files
authored
Merge pull request #11579 from mjuhasz/fix/find-highlight-plain-textbox
Fix find highlight and Find Next not advancing (plain text box mode)
2 parents 500ad98 + 516ef52 commit 00e7476

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

src/ui/Features/Main/MainViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9712,7 +9712,7 @@ private async Task FindNext()
97129712

97139713
var subs = Subtitles.Select(p => p.Text).ToList();
97149714
var currentLineIndex = Subtitles.IndexOf(selectedSubtitle);
9715-
var currentCharIndex = EditTextBox.CaretIndex;
9715+
var currentCharIndex = EditTextBox.SelectionEnd;
97169716
var idx = _findService.FindNext(_findService.SearchText, subs, currentLineIndex, currentCharIndex);
97179717

97189718
if (idx < 0)

src/ui/Features/Shared/TextBoxUtils/TextBoxWrapper.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ public void Select(int start, int length)
5353
{
5454
_textBox.SelectionStart = start;
5555
_textBox.SelectionEnd = start + length;
56-
_textBox.CaretIndex = start + length;
5756
}
5857

5958
public int CaretIndex

0 commit comments

Comments
 (0)