You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
textarea: Delete on the last character also removes the following newline #1071
Describe the bug
In textarea, pressing Delete on the last character of a non-final line removes both that character and the following newline. For example, deleting b from ab\ncd produces acd instead of a\ncd.
Reproduced on current main c3bde0d166c2ca607d9864493453fd77bdcae7e4, Go 1.26.0, macOS arm64. No terminal or interactive input is needed.
To reproduce
Run in a module using the revision above:
DeleteCharacterForward deletes the rune, then checks whether the cursor is at the new line end and merges the next line too. Checking for an existing line end before deleting avoids performing both operations on one keypress. Delete pressed at an existing line end should still join the lines.
I have a three-line reorder and an eight-case regression covering ASCII, a one-character line, a wide character, and line-boundary controls. The public API reproducer was executed before and after the change.
AI disclosure: this report, patch and tests were prepared by a Codex agent. The behavior and fix were tested locally; no upstream acceptance or full cross-platform validation is claimed.
Activity