Skip to content

Commit 580d370

Browse files
authored
Merge pull request #29 from bcmi-labs/fix-cpp-and-compile-flags-files-path
Fixed path of the gen cpp and compile_flags files.
2 parents 1a22df3 + 98e078c commit 580d370

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

handler/builder.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ func generateCpp(inoCode []byte, sourcePath, fqbn string) (cppPath string, cppCo
5353
}
5454

5555
// Generate compile_flags.txt
56-
cppPath = filepath.Join(rootTempDir, sketchFileName+".cpp")
57-
flagsPath, err := generateCompileFlags(rootTempDir, inoPath, sourcePath, fqbn)
56+
cppPath = filepath.Join(sketchTempPath, sketchFileName+".cpp")
57+
flagsPath, err := generateCompileFlags(sketchTempPath, inoPath, sourcePath, fqbn)
5858
if err != nil {
5959
return
6060
}
@@ -63,7 +63,7 @@ func generateCpp(inoCode []byte, sourcePath, fqbn string) (cppPath string, cppCo
6363
}
6464

6565
// Generate target file
66-
cppCode, err = generateTargetFile(rootTempDir, inoPath, cppPath, fqbn)
66+
cppCode, err = generateTargetFile(sketchTempPath, inoPath, cppPath, fqbn)
6767
return
6868
}
6969

handler/handler.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,7 @@ func (handler *InoHandler) parseCommandArgument(rawArg interface{}) interface{}
840840
func (handler *InoHandler) showMessage(ctx context.Context, msgType lsp.MessageType, message string) {
841841
params := lsp.ShowMessageParams{
842842
Type: msgType,
843-
Message: strings.ReplaceAll(message, "\n", "<br>"),
843+
Message: message,
844844
}
845845
handler.StdioConn.Notify(ctx, "window/showMessage", &params)
846846
}

0 commit comments

Comments
 (0)