https://bugs.kde.org/show_bug.cgi?id=487768
Bug ID: 487768
Summary: New blank text files from Dolphin or Desktop dialog
include a seemingly unnecessary space character.
Classification: Frameworks and Libraries
Product: frameworks-kio
Version: 5.92.0
Platform: Ubuntu
OS: Linux
Status: REPORTED
Severity: wishlist
Priority: NOR
Component: general
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Target Milestone: ---
SUMMARY
When a new text file is created through Dolphin or any system dialog, the text
file created is not completely empty -- it contains a space and a newline.
I presume the purpose of this is to make the thumbnail preview images look
better, as the thumbnail of a completely empty text file does look different.
However, the space is unnecessary for this. A text file containing a space and
a newline is completely indistinguishable from a text file containing only a
newline, when looking at the thumbnail preview.
Meanwhile, the space at the beginning of the document can be annoying
sometimes. If you open the text file in Kate and forget to delete that space
first, Kate will assume the leading space indicates indentation and it will
indent every subsequent line the same way, adding an unnecessary leading space
to every line. (This is particularly annoying when using this workflow to
create a phyton script, where indentation matters.)
The text file is created using the template here:
https://invent.kde.org/frameworks/kio/-/blob/master/src/new_file_templates/TextFile.txt?ref_type=heads
This is a very minor issue, yes, but all that would be required to fix it is to
remove the space character in that file.
STEPS TO REPRODUCE
1. Open Dolphin to a directory with write access
2. Right click --> create new --> text document
3. Open the text document
OBSERVED RESULT
The text document contains an unnecessary space character. (That character can
be removed without affecting the thumbnail preview of the file, as long as the
following newline is retained.)
EXPECTED RESULT
The text document contains only a newline. (So it won't cause unnecessary
indentation confusion in any text editor, and so that the newly created blank
text document is truly blank.)
SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Ubuntu Studio 22.04 |6.5.0-25-lowlatency
(available in About System)
KDE Plasma Version: 5.24.7
KDE Frameworks Version: 5.92.0
Qt Version: 5.15.3
--
You are receiving this mail because:
You are watching all bug changes.