[jedit:bugs] #4125 Delete at the end of the line does not delete newline (java20, java21)

Dale Anson via jEdit-devel <[email protected]>
Newsgroups gmane.editors.jedit.devel
Message-ID </p/jedit/bugs/4125/1a9488bab4df3bf012a67e99a186f8f8ad84b0ee.bugs@jedit.p.sourceforge.net>
I'm not up on the TextArea code, but if I add this line:

length = length == 0 ? 1 : length;

to TextArea.java at line 5855, it seems to fix the issue for Java 20 and still works correctly with Java 11. This doesn't feel like the right fix, though, I'm not sure why the length comes back as 0 when the caret is at the end of the line. Maybe someone who is more familiar with the TextArea code could take a look?


---

**[bugs:#4125] Delete at the end of the line does not delete newline (java20, java21)**

**Status:** open
**Group:** normal bug
**Created:** Sun Jun 04, 2023 12:51 PM UTC by Alan Ezust
**Last Updated:** Sun Jun 04, 2023 12:51 PM UTC
**Owner:** nobody


If I am at the end of a line and I hit delete, the newline char is not deleted anymore.
Using jedit 5.6.0, openjdk 20 or 21 on kubuntu linux 22.04.

Switching to openjdk 19 makes the problem go away.



---

Sent from sourceforge.net because [email protected] is subscribed to https://sourceforge.net/p/jedit/bugs/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/jedit/admin/bugs/options.  Or, if this is a mailing list, you can unsubscribe from the mailing list.

-- 
-----------------------------------------------
jEdit Developers' List
[email protected]
https://lists.sourceforge.net/lists/listinfo/jedit-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.