Skip to content

Commit

Permalink
wrap selection with quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
maheshj01 committed Oct 15, 2024
1 parent d40091c commit 9bd4fa1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/app/(main)/_components/completion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ const TextCompletionInput: React.FC<TextCompletionInputProps> = ({
}

const handleKeyDown = async (event: React.KeyboardEvent<HTMLTextAreaElement>) => {
if (event.key.toLowerCase() === '`' || event.key.toLowerCase() === "'" || (event.shiftKey && event.key.toLowerCase() === '"')) {
event.preventDefault();
applyFormatting(event.key);
return;
}

if (event.ctrlKey || event.metaKey) {
switch (event.key.toLowerCase()) {
case 'b':
Expand Down

0 comments on commit 9bd4fa1

Please sign in to comment.