As reported on the German-language Wikipedia's feedback page, the NWE adds a newline when a line of text is selected in its entirety, copied, and immediately pasted without changing the selected region.
Steps to reproduce:
- Open an article with the 2017 Wikitext Editor
- Find a list or create a new list (It is not important whether it is a list or not, but it is easiest to see this way)
- Place the cursor at the very front of a line in the middle of a list
- Press the left mouse-button (to select the text) and move down the cursor to the start of next line (alternatively, place the cursor, hold shift, and press arrow-down)
- Copy the text using Ctrl + C
- Without moving the cursor, paste the text using Ctrl + V
Expected: Nothing changes, the text is replaced with itself
Actual: A new line is inserted below the cursor
While it makes sense that by selecting the text as described, the linebreak is included in the selection, text editors usually do not behave this way, because they will replace the linebreak with a linebreak. You can test this right here in Phabricator, or in an editor such as Notepad++, or Microsoft Word.