mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-21 15:33:11 +01:00
fix: exclude Meta, Alt, Home and End key press for autocomplete trigger (#3441)
This commit is contained in:
parent
7fd7eafdcb
commit
c4492b5d94
@ -283,7 +283,7 @@ export default class CodeEditor extends React.Component {
|
||||
let curWord = start != end && currentLine.slice(start, end);
|
||||
// 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)) &&
|
||||
/(?<!\d)[a-zA-Z\._]$/.test(curWord)
|
||||
|
Loading…
Reference in New Issue
Block a user