diff --git a/src/EditorSuggester.ts b/src/EditorSuggester.ts index cc13355..187bbed 100644 --- a/src/EditorSuggester.ts +++ b/src/EditorSuggester.ts @@ -43,7 +43,7 @@ export class EditorSuggester extends EditorSuggest { if (link_pos < 0 && embed_pos < 0) return null; const isLink = link_pos >= 0 && - (cursor.ch - link_pos > cursor.ch - embed_pos || embed_pos < 0); + (cursor.ch - link_pos < cursor.ch - embed_pos || embed_pos < 0); const pos = isLink ? link_pos : embed_pos; const currentContent = currentLine.substring(pos + 1, cursor.ch).trim();