Bug 440369 - Pasting text directly in dolphin creates file without end new line
Summary: Pasting text directly in dolphin creates file without end new line
Status: RESOLVED NOT A BUG
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 21.07.80
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-28 19:36 UTC by Andrew Shark
Modified: 2023-04-07 07:02 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.