File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,8 @@ package builder
3232import (
3333 "fmt"
3434 "path/filepath"
35+ "runtime"
36+ "strings"
3537
3638 "arduino.cc/builder/constants"
3739 "arduino.cc/builder/i18n"
@@ -77,6 +79,16 @@ func (s *ArduinoPreprocessorRunner) Run(ctx *types.Context) error {
7779 properties .Merge (toolProps )
7880 properties [constants .BUILD_PROPERTIES_SOURCE_FILE ] = targetFilePath
7981 if ctx .CodeCompleteAt != "" {
82+ if runtime .GOOS == "windows" {
83+ //use relative filepath to avoid ":" escaping
84+ splt := strings .Split (ctx .CodeCompleteAt , ":" )
85+ if len (splt ) == 3 {
86+ //all right, do nothing
87+ } else {
88+ splt [1 ] = filepath .Base (splt [0 ] + ":" + splt [1 ])
89+ ctx .CodeCompleteAt = strings .Join (splt [1 :], ":" )
90+ }
91+ }
8092 properties ["codecomplete" ] = "-output-code-completions=" + ctx .CodeCompleteAt
8193 } else {
8294 properties ["codecomplete" ] = ""
You can’t perform that action at this time.
0 commit comments