This repository was archived by the owner on Oct 21, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -158,7 +158,8 @@ class MonacoEditorDfdBehaviorCompletionProvider implements monaco.languages.Comp
158158 } ;
159159 }
160160
161- const lastWord = model . getLineContent ( position . lineNumber ) . trimEnd ( ) . split ( " " ) . pop ( ) || "" ;
161+ const lastWord =
162+ model . getLineContent ( position . lineNumber ) . substring ( 0 , position . column ) . trimEnd ( ) . split ( " " ) . pop ( ) || "" ;
162163 const availableInputs = parent . getAvailableInputs ( ) . filter ( ( input ) => input !== undefined ) as string [ ] ;
163164 if ( lastWord . endsWith ( "," ) || lastWord . endsWith ( "." ) || lastWord == statementType ?. word ) {
164165 // Suggestions per statement type
@@ -181,7 +182,7 @@ class MonacoEditorDfdBehaviorCompletionProvider implements monaco.languages.Comp
181182 } ;
182183 }
183184 } else if ( statementType ?. word === "assign" ) {
184- const line = model . getLineContent ( position . lineNumber ) ;
185+ const line = model . getLineContent ( position . lineNumber ) . substring ( 0 , position . column ) ;
185186 const hasFromKeyword = line . includes ( "from" ) ;
186187 const hasIfKeyword = line . includes ( "if" ) ;
187188 if ( lastWord == "from" ) {
You can’t perform that action at this time.
0 commit comments