Skip to content

Commit 9cf0292

Browse files
authored
fix: enable filter library name in SET statement (#1609)
1 parent 106a78a commit 9cf0292

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

server/src/sas/CompletionProvider.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -866,10 +866,12 @@ export class CompletionProvider {
866866
if (stmtName === "SET") {
867867
const pos = this.popupContext.position;
868868
const lineText = this.model.getLine(pos.line);
869-
const firstOptForSET =
870-
lineText
871-
.slice(lineText.toUpperCase().indexOf("SET") + 3, pos.character)
872-
.search(/\S/) === -1;
869+
const firstOptForSET = /^\s+\S*$/.test(
870+
lineText.slice(
871+
lineText.toUpperCase().indexOf("SET") + 3,
872+
pos.character,
873+
),
874+
);
873875
const libref = this._findLibRef();
874876
if (firstOptForSET || libref) {
875877
this.loader.getLibraryList((data: OptionValues) => {

0 commit comments

Comments
 (0)