Skip to content

Commit

Permalink
open on first char in compatibility mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Ebonsignori committed Dec 24, 2023
1 parent 18ee8d5 commit 0b43cfe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/compatibility-mode-extension/extension-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,10 @@ export function atSymbolTriggerExtension(
return false;
}

let justOpened = false;
if (!this.isOpen && typedChar === settings.triggerSymbol) {
return this.openSuggestion();
justOpened = true;
this.openSuggestion();
} else if (!this.isOpen) {
return false;
}
Expand All @@ -129,7 +131,7 @@ export function atSymbolTriggerExtension(
key.includes("arrow")
) {
return false;
} else {
} else if (!justOpened) {
this.openQuery += typedChar;
}

Expand Down
2 changes: 1 addition & 1 deletion src/utils/valid-file-name.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const validCharRegex =
/[a-z0-9\\$\\-\\_\\!\\%\\"\\'\\.\\,\\*\\&\\(\\)\\;\\{\\}\\+\\=\\~\\`\\?\\<\\>)]/i;
/[a-z0-9\\$\\-\\_\\!\\%\\"\\'\\.\\,\\*\\&\\@\\(\\)\\;\\{\\}\\+\\=\\~\\`\\?\\<\\>)]/i;

export const isValidFileNameCharacter = (char: string) => {
if (char === " ") {
Expand Down

0 comments on commit 0b43cfe

Please sign in to comment.