Skip to content

Commit

Permalink
Fix crash when adding bookmark
Browse files Browse the repository at this point in the history
  • Loading branch information
KyrietS committed Oct 20, 2024
1 parent 6fd4202 commit 677bc5d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/LogAlligator.App/Controls/TextArea/TextAreaView.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,9 @@ public void AddBookmark()
if (_caretPosition is null)
return;

int currentLineIndex = _caretPosition.Value.Line;
int currentLineNumber = _lines.GetLineNumber(_caretPosition.Value.Line);
string currentLineText = _lines[currentLineNumber];
string currentLineText = _lines[currentLineIndex];
string? selectedText = GetSelectedText();

RaiseEvent(new BookmarkEventArgs {
Expand Down

0 comments on commit 677bc5d

Please sign in to comment.