From c4492b5d9424ab6c22c7fac732e06f04c6032704 Mon Sep 17 00:00:00 2001 From: lohit Date: Wed, 20 Nov 2024 03:31:44 +0530 Subject: [PATCH] fix: exclude Meta, Alt, Home and End key press for autocomplete trigger (#3441) --- packages/bruno-app/src/components/CodeEditor/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/bruno-app/src/components/CodeEditor/index.js b/packages/bruno-app/src/components/CodeEditor/index.js index f0f1ed55e..cd91c1b46 100644 --- a/packages/bruno-app/src/components/CodeEditor/index.js +++ b/packages/bruno-app/src/components/CodeEditor/index.js @@ -281,9 +281,9 @@ export default class CodeEditor extends React.Component { while (end < currentLine.length && /[^{}();\s\[\]\,]/.test(currentLine.charAt(end))) ++end; while (start && /[^{}();\s\[\]\,]/.test(currentLine.charAt(start - 1))) --start; let curWord = start != end && currentLine.slice(start, end); - //Qualify if autocomplete will be shown + // Qualify if autocomplete will be shown if ( - /^(?!Shift|Tab|Enter|Escape|ArrowUp|ArrowDown|ArrowLeft|ArrowRight|\s)\w*/.test(event.key) && + /^(?!Shift|Tab|Enter|Escape|ArrowUp|ArrowDown|ArrowLeft|ArrowRight|Meta|Alt|Home|End\s)\w*/.test(event.key) && curWord.length > 0 && !/\/\/|\/\*|.*{{|`[^$]*{|`[^{]*$/.test(currentLine.slice(0, end)) && /(?