Skip to content

Commit ab8baaf

Browse files
committed
Fix editor's autocomplete for first filter option
This was reported in the past somewhere, can't remember where exactly. This was a regression from: aaf35d9d71
1 parent 4c0a6b8 commit ab8baaf

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/js/codemirror/ubo-static-filtering.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -513,10 +513,12 @@ function initHints() {
513513
if ( patternNode === 0 ) { return; }
514514
const patternEnd = astParser.getNodeStringEnd(patternNode);
515515
const beg = cursor.ch;
516+
const lineBefore = line.slice(0, beg);
516517
if ( beg <= patternEnd ) {
517-
return getNetPatternHints(cursor, line);
518+
if ( astParser.hasOptions() !== false || lineBefore.includes('$') === false ) {
519+
return getNetPatternHints(cursor, line);
520+
}
518521
}
519-
const lineBefore = line.slice(0, beg);
520522
const lineAfter = line.slice(beg);
521523
let matchLeft = /[^$,]*$/.exec(lineBefore);
522524
let matchRight = /^[^,]*/.exec(lineAfter);

0 commit comments

Comments
 (0)