Bug 513758 - When a parent directory has only a subdirectory and no files the file browser shows a blank line where a file would be
Summary: When a parent directory has only a subdirectory and no files the file browser...
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (other bugs)
Version First Reported In: Git
Platform: Solus Linux
: NOR minor
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-12-23 23:19 UTC by TraceyC
Modified: 2025-12-24 18:13 UTC (History)
1 user (show)

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


Attachments
Blank line under empty subdir (75.58 KB, image/png)
2025-12-23 23:19 UTC, TraceyC
Details
video POC (825.09 KB, video/webm)
2025-12-24 14:57 UTC, elijaharagonmorgan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description TraceyC 2025-12-23 23:19:13 UTC
Created attachment 187921 [details]
Blank line under empty subdir

SUMMARY
When a session has a directory that has only a subdirectory, and the subdirectory has no files, the file browser adds a blank line under the subdirectory. It persists even after files are added.

STEPS TO REPRODUCE
1. Create the following directory structure:
project/parent/subdir
2. In a new Kate session, open the "project" folder
3. Display the file browser on the left if necessary

OBSERVED RESULT
There is a blank line with a line next to it, as if there was a file, but where the filename would be there is a blank space

EXPECTED RESULT
There is nothing shown under the subdir directory

SOFTWARE/OS VERSIONS
Operating System: Solus 4.8
KDE Plasma Version: 6.5.80
KDE Frameworks Version: 6.22.0
Qt Version: 6.10.1
Kernel Version: 6.17.8-324.current (64-bit)
Graphics Platform: Wayland

ADDITIONAL INFORMATION
This is also present in Fedora, which has Kate 25.12.0
I found this while testing a crash reported in bug 513753
In the screenshot, you can see the blank line under
folder2/2
Comment 1 elijaharagonmorgan 2025-12-24 14:57:58 UTC
Created attachment 187944 [details]
video POC

I have reproduced bug on Arch rolling, KDE 6.5.4.
Comment 2 Waqar Ahmed 2025-12-24 18:00:45 UTC
Git commit 5a96153aaaedeb382dd9f68c75f4c4c17779ae69 by Waqar Ahmed.
Committed on 24/12/2025 at 17:59.
Pushed by waqar into branch 'master'.

Only append child's children if there's something to append

M  +4    -1    addons/project/kateprojectviewtree.cpp

https://invent.kde.org/utilities/kate/-/commit/5a96153aaaedeb382dd9f68c75f4c4c17779ae69
Comment 3 elijaharagonmorgan 2025-12-24 18:01:49 UTC
thanks.
was the video any help.
Comment 4 Waqar Ahmed 2025-12-24 18:12:05 UTC
Git commit 03886fd054d4e518e0b48090ff6401937635747d by Waqar Ahmed.
Committed on 24/12/2025 at 18:11.
Pushed by waqar into branch 'release/25.12'.

Only append child's children if there's something to append

M  +4    -1    addons/project/kateprojectviewtree.cpp

https://invent.kde.org/utilities/kate/-/commit/03886fd054d4e518e0b48090ff6401937635747d
Comment 5 elijaharagonmorgan 2025-12-24 18:13:19 UTC
whats going on here, why commit it twice.