editor: Fix duplicate and copy line newlines (#39610)

Closes #34797 and its child #39508.


![zed-#34797-#39508](https://github.com/user-attachments/assets/48a0fe28-8b8a-480d-bffc-6abc7ff310ff)

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
2 files changedLine totals unavailable