Skip to content
This repository was archived by the owner on Nov 6, 2025. It is now read-only.

Commit a8831ca

Browse files
Only show MD emoji completion when prev char is whitespace
1 parent a961588 commit a8831ca

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Helpers/MarkdownTextViewListener.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,13 @@ private bool Start()
156156
SnapshotPoint caret = _textView.Caret.Position.BufferPosition;
157157
ITextSnapshot snapshot = caret.Snapshot;
158158

159+
if (caret > 1)
160+
{
161+
char prev = snapshot.GetText(caret - 2, 1)[0];
162+
if (!char.IsWhiteSpace(prev))
163+
return false;
164+
}
165+
159166
// Generate a session based off of the existing broker and textview
160167
if (!_broker.IsCompletionActive(_textView))
161168
{

0 commit comments

Comments
 (0)