editor: Fix duplicate and copy line newlines (#39610)
Closes #34797 and its child #39508.

Release Notes:
- Fixed `editor::DuplicateLineUp` duplicating the last line onto itself
when the line doesn't end with a newline (#39508)
- Fixed line copy not including a newline at end of buffer, causing
paste to occur on the same line (#34797)
c1e3958c26Tom Planche committed on 10/8/2025, 10:56:25 PM· committed by GitHubparentba937d1