Skip to content

Commit

Permalink
Fix autocomplete on 1 letter following url.equal
Browse files Browse the repository at this point in the history
  • Loading branch information
sakurai-youhei committed Oct 16, 2023
1 parent cde3293 commit 2a672c9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/plugins/console/public/lib/autocomplete/autocomplete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1145,6 +1145,14 @@ export default function ({
currentToken.value.length === 1
) {
// do not suppress autocomplete for a single character immediately following a slash or comma in URL
} else if (
lastEvaluatedToken.position.column + 1 === currentToken.position.column &&
lastEvaluatedToken.position.lineNumber === currentToken.position.lineNumber &&
lastEvaluatedToken.type === 'url.equal' &&
currentToken.type === 'url.value' &&
currentToken.value.length === 1
) {
// do not suppress autocomplete for a single character immediately following an equal in URL
} else if (
lastEvaluatedToken.position.column < currentToken.position.column &&
lastEvaluatedToken.position.lineNumber === currentToken.position.lineNumber &&
Expand Down

0 comments on commit 2a672c9

Please sign in to comment.