Auto Format deletes first line of non-.ino
sketch files
#746
Labels
conclusion: resolved
Issue was resolved
topic: language server
Related to the Arduino Language Server
type: imperfection
Perceived defect in any part of project
Describe the bug
In addition to the
.ino
file extension of the Arduino programming language, Arduino sketches may contain files of other programming languages, indicated by the appropriate file extension (e.g.,.c
,.cpp
,.h
).🐛 When the Arduino IDE's Auto Format feature is used to format a sketch file with one of these file extensions other than
.ino
, the first line of the sketch is erased.To Reproduce
.c
,.cpp
, or.h
(e.g.,SomeTab.h
).🐛 The first line of the file is erased.
Expected behavior
Format the code of any supported sketch file without deleting any code.
Desktop
Date: 2022-01-05T11:13:17.867Z
Additional context
The issue does not occur in
.ino
files.It seems similar to #543 at first glance, but it is not the same issue.
Language server logs: SomeSketch.zip
Originally reported at https://forum.arduino.cc/t/ctrl-t-deletes-first-line-s-of-file/941177
The text was updated successfully, but these errors were encountered: