Skip to content
This repository has been archived by the owner on Sep 11, 2023. It is now read-only.

Commit

Permalink
fixed crash on bracket input
Browse files Browse the repository at this point in the history
  • Loading branch information
maxijabase committed Feb 25, 2021
1 parent 2c1706e commit b37df05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion UI/Components/EditorElement.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -940,7 +940,7 @@ public void TextArea_TextEntered(object sender, TextCompositionEventArgs e)
{
var document = editor.Document;
var offset = editor.TextArea.Caret.Offset;
if (editor.SelectionLength == 0 &&
if (editor.SelectionLength == 0 && offset + 1 < document.TextLength &&
(bracketHelper.CheckForCommentBlockForward(document, offset) ||
bracketHelper.CheckForCommentBlockBackward(document, offset) ||
bracketHelper.CheckForCommentLine(document, offset) ||
Expand Down

0 comments on commit b37df05

Please sign in to comment.