private void FindResultsScintilla_KeyUp(object sender, KeyEventArgs e) { int pos = FindResultsScintilla.CurrentPosition; int selectedLine = FindResultsScintilla.LineFromPosition(pos); if (_findAllResults?.Count > selectedLine) { ScintillaNET_FindReplaceDialog.CharacterRange CharRange = _findAllResults[selectedLine]; Scintilla.SetSelection(CharRange.cpMin, CharRange.cpMax); Scintilla.ScrollCaret(); } }
private void FindResultsScintilla_MouseClick(object sender, MouseEventArgs e) { int pos = FindResultsScintilla.CharPositionFromPointClose((e.Location).X, (e.Location).Y); if (pos == -1) { return; } int selectedLine = FindResultsScintilla.LineFromPosition(pos); ScintillaNET_FindReplaceDialog.CharacterRange CharRange = _findAllResults[selectedLine]; Scintilla.SetSelection(CharRange.cpMin, CharRange.cpMax); Scintilla.ScrollCaret(); }