arduino / arduino/Arduino

Ctrl+y issued after destructive Ctrl+z deletes text, causes auto save and Auto Compilation to generate exception

Open
#8,476 4 comments 0 reactions 0 assignees View on GitHub
Component: IDE user interface Type: Bug
Dominant language
Java
Stars
14.6k
Forks
7k
PR merge metrics
No merged PRs in 30d

Description

Using Arduino IDE 1.8.8

While editing a Large sketch, and after many changes and intermittent saves, when trying to use a **Ctrl+z** to correct a change the corrected text is all wrong and there are a number of deletions that occur that do not match the text before **Ctrl+z** was issued.

Next when trying to correct the change with a **Ctrl+y**, an automatic compile happens which generates the following "Exception in thread "AWT-EventQueue-0" java.lang.InternalError: Text range not in document: 1975-1973" crash:
[Arduino IDE Crash - Feb 2019.txt](https://github.com/arduino/Arduino/files/2822219/Arduino.IDE.Crash.-.Feb.2019.txt)

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the Ctrl+z/Ctrl+y sequence in Arduino IDE 1.8.8 with a large sketch, then inspect the attached crash log for the text range error. The issue names no source files or tests; done means correcting undo/redo no longer deletes unrelated text or triggers the reported auto-compile exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.