Skip to content

Arduino IDE2.1.0 save as truncates the end of the file if it exceeds 64kb #2086

Closed
@David2153

Description

@David2153

Describe the problem

There seems to be a problem with the new IDE 2.1.0 editor when I try to copy a section of code from one sketch to another sketch using the standard right click COPY and PASTE. The copy and paste seems to work however I then use SAVEAS to save the new sketch into a new sketch/file and the file that is created is unexpectedly truncated (ie. missing lines of code at the bottom of the sketch). I have used this technique successfully on many occasions with the older IDE 1.8.19 without this issue.

To reproduce

  1. open an existing sketch
  2. open a second existing sketch
  3. highlight and COPY a section of code in the 1st sketch
  4. PASTE this section of code to the 2nd sketch
  5. SAVEAS the 2nd sketch to a new file name/location
  6. the saved file is unexpectedly truncated

Expected behavior

I'd expect the new sketch not to be truncated.

Arduino IDE version

2.1.0

Operating system

Windows

Operating system version

WIN10

Additional context

No response

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions