Bug 440369

Summary: Pasting text directly in dolphin creates file without end new line
Product: [Applications] dolphin Reporter: Andrew Shark <ashark>
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: RESOLVED NOT A BUG    
Severity: normal CC: kfm-devel, meven
Priority: NOR    
Version: 21.07.80   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Andrew Shark 2021-07-28 19:36:28 UTC
Each text file should have newline at end of file, according to this question: https://stackoverflow.com/questions/5813311/whats-the-significance-of-the-no-newline-at-end-of-file-log

But automatically created files misses that new line.

STEPS TO REPRODUCE
1. Copy these two text lines to clipboard:
first line
second line
2. Open some folder in Dolphin
3. Press ctrl + v shortcut.
4. File name dialog will appear. Enter test.txt.
5. Run `wc -l test.txt`

The output of the command is:
1 test.txt

The output of the command should be:
2 test.txt

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.22.3
KDE Frameworks Version: 5.84.0
Qt Version: 5.15.2
Dolphin 21.07.80
Comment 1 Bug Janitor Service 2022-12-01 04:55:22 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/1072
Comment 2 Méven 2023-04-07 07:02:10 UTC
A system should not edit anything for the user without him knowing.

The need here is very specific to development, as such you should use development tools (aka formatter...) rather than making the DE a dev-tailer environment.