Bug 454703 - Saving file adds empty line at the end if there isn't already one
Summary: Saving file adds empty line at the end if there isn't already one
Status: RESOLVED NOT A BUG
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: 22.04.1
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-01 12:18 UTC by pompabidu
Modified: 2022-06-03 20:22 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pompabidu 2022-06-01 12:18:34 UTC
SUMMARY
Saving a file adds an empty line at the end of the file if the last line was not already empty.

STEPS TO REPRODUCE
1. Open a new file in Kate.
2. Type text such that the last line is not empty.
3. Save the file anywhere.

OBSERVED RESULT
An empty line is added at the end of the file. Opening the file in another editor shows the empty line.

EXPECTED RESULT
The file should be saved without an additional empty line.

SOFTWARE/OS VERSIONS
Observed on Artix, both under X and Wayland, and on Manjaro under X.
Version numbers for both cases:
Kate 22.04.1
KDE Frameworks 5.94.0
Qt 5.15.4 (built against 5.15.3)
Comment 1 Waqar Ahmed 2022-06-01 13:24:06 UTC
Configure Kate -> Open/Save -> disable "Append new line at the end of file"
Comment 2 pompabidu 2022-06-03 20:22:05 UTC
My bad, you're right.
Still, I think it's a strange choice to put this as default.