Skip to content

Commit 1dab82e

Browse files
committed
fix multitab error reporting
Signed-off-by: Martino Facchin <[email protected]>
1 parent 34d5b8d commit 1dab82e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/arduino.cc/builder/prototypes_adder.go

+1
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ func composePrototypeSection(line int, prototypes []*types.Prototype) string {
9292
str := joinPrototypes(prototypes)
9393
str += "\n#line "
9494
str += strconv.Itoa(line)
95+
str += " \"" + prototypes[0].File + "\""
9596
str += "\n"
9697

9798
return str

src/arduino.cc/builder/sketch_source_merger.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func (s *SketchSourceMerger) Run(context map[string]interface{}) error {
4848
includeSection += "#include <Arduino.h>\n"
4949
lineOffset++
5050
}
51-
includeSection += "#line 1\n"
51+
includeSection += "#line 1 \"" + strings.Replace((&sketch.MainFile).Name, "\\", "\\\\", -1) + "\"\n"
5252
lineOffset++
5353
context[constants.CTX_INCLUDE_SECTION] = includeSection
5454

0 commit comments

Comments
 (0)