Page MenuHomePhabricator

Pasting of a complete line loses the trailing newline
Open, Stalled, Needs TriagePublic

Description

Steps to reproduce

  1. Cut or copy text containing one or more newline characters at the end.
  2. Paste the text in AWB's edit box (while editing a wiki page).

Actual results
When pasting in the edit box, if the text on the clipboard ends in a newline, that character is silently omitted. If the clipboard text has multiple trailing newlines, only the last is omitted. This happens regardless of where the source text was cut or copied from (including other, non-AWB windows).

Expected results
Any trailing newline characters should be pasted as well, as was presumably the editor's intention when selecting them before cutting or copying. This is the behavior of all other applications.

Event Timeline

This applies to copy-and-paste as well as cut-and-paste. I'll see if I can edit your task description accordingly...

Voidxor renamed this task from cut-and-paste of a complete line loses the newline to Pasting of a complete line loses the trailing newline.Jun 24 2020, 10:58 PM

I don't know if this is related, but the edit box also omits the trailing newline at the bottom of each page.

Rjwilmsi changed the task status from Open to Stalled.Jan 25 2025, 11:43 AM
Rjwilmsi subscribed.

I'm unable to replicate this behaviour - copy paste from within AWB main edit box or from a text editor external to AWB keeps all trailing whitespace as expected within the main edit box.