Skip to content

Commit 19cbd82

Browse files
committed
Update inoURI after (the optional) inoToCpp conversion
2021/09/15 12:56:55 --> completion(file:///home/cmaglie/Arduino/Blink/Blink.ino:13:5) 2021/09/15 12:56:55 --> completion(file:///tmp/arduino-language-server299721744/sketch/Blink.ino.cpp:20:5) otherwise inoUri will still point to file:///home/cmaglie/Arduino/Blink/Blink.ino instead of file:///tmp/arduino-language-server299721744/sketch/Blink.ino.cpp
1 parent 2fdf332 commit 19cbd82

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: handler/handler.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,6 @@ func (handler *InoHandler) HandleMessageFromIDE(ctx context.Context, conn *jsonr
361361

362362
case *lsp.CompletionParams:
363363
// method: "textDocument/completion"
364-
inoURI = p.TextDocument.URI
365364
log.Printf("--> completion(%s:%d:%d)\n", p.TextDocument.URI, p.Position.Line, p.Position.Character)
366365

367366
if res, e := handler.ino2cppTextDocumentPositionParams(&p.TextDocumentPositionParams); e == nil {
@@ -370,6 +369,7 @@ func (handler *InoHandler) HandleMessageFromIDE(ctx context.Context, conn *jsonr
370369
} else {
371370
err = e
372371
}
372+
inoURI = p.TextDocument.URI
373373

374374
case *lsp.CodeActionParams:
375375
// method "textDocument/codeAction"

0 commit comments

Comments
 (0)