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

Commit b37df05

Browse files
committed
fixed crash on bracket input
1 parent 2c1706e commit b37df05

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

UI/Components/EditorElement.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -940,7 +940,7 @@ public void TextArea_TextEntered(object sender, TextCompositionEventArgs e)
940940
{
941941
var document = editor.Document;
942942
var offset = editor.TextArea.Caret.Offset;
943-
if (editor.SelectionLength == 0 &&
943+
if (editor.SelectionLength == 0 && offset + 1 < document.TextLength &&
944944
(bracketHelper.CheckForCommentBlockForward(document, offset) ||
945945
bracketHelper.CheckForCommentBlockBackward(document, offset) ||
946946
bracketHelper.CheckForCommentLine(document, offset) ||

0 commit comments

Comments
 (0)