Bug 458136

Summary: "Elide tab text" not working
Product: [Applications] kate Reporter: popov895 <popov895>
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: christoph, p.r.worrall, popov895, waqar.17a
Priority: NOR    
Version First Reported In: 22.08.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 22.12.0
Sentry Crash Report:
Attachments: Tab with the full long file name

Description popov895 2022-08-21 09:44:22 UTC
Created attachment 151473 [details]
Tab with the full long file name

SUMMARY

The option "Elide tab text" ("Settings" > "Behavior" > "Elide tab text") doesn't seem to work. I enabled this option, opened a file with a long name (100 characters) and the tab name shows the full file name.

SOFTWARE/OS VERSIONS

Operating System: Fedora Linux 36
KDE Plasma Version: 5.25.4
KDE Frameworks Version: 5.97.0
Qt Version: 5.15.5
Graphics Platform: X11
Comment 1 Paul Worrall 2022-08-21 12:46:29 UTC
Confirmed.  It should elide the tab similarly to the window title bar
Comment 2 Waqar Ahmed 2022-08-21 15:58:24 UTC
Working as expected I believe. Most likely you have "unlimited tabs" option set. Atm, if "Unlimited Tabs" is enabled then eliding is disabled and tab scrolling is enabled by kate. Scrolling is a must with unlimited tabs as otherwise the editor width can grow indefinitely leading to a bad experience. Not sure about eliding, that can be honored I think.

Quick solution: Use a tab limit.
Comment 3 popov895 2022-08-21 17:18:44 UTC
(In reply to Waqar Ahmed from comment #2)
> Working as expected I believe. Most likely you have "unlimited tabs" option
> set. Atm, if "Unlimited Tabs" is enabled then eliding is disabled and tab
> scrolling is enabled by kate. Scrolling is a must with unlimited tabs as
> otherwise the editor width can grow indefinitely leading to a bad
> experience. Not sure about eliding, that can be honored I think.

In truth, it's completely unclear to me.
Comment 4 Waqar Ahmed 2022-08-21 17:32:10 UTC
Check "Behavior", in Kate settings. There's an option to limit tabs

Besides that, yeah. How these settings effect each other is a bit confusing.
Comment 5 popov895 2022-08-21 18:03:20 UTC
Yeah, I see what you mean. I just wouldn't have thought of it myself.

Also, there is a very funny behavior if "Limit number of tabs" limit to 1. Guys, something must be done about this.
Comment 6 Bug Janitor Service 2022-08-21 19:21:36 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kate/-/merge_requests/846
Comment 7 Christoph Cullmann 2022-08-21 20:46:24 UTC
Git commit 0a5ba9ca61808ea479f12337114f529efa5a12a4 by Christoph Cullmann.
Committed on 21/08/2022 at 19:19.
Pushed by cullmann into branch 'master'.

always follow the user setting for eliding tabs

M  +2    -2    apps/lib/katetabbar.cpp

https://invent.kde.org/utilities/kate/commit/0a5ba9ca61808ea479f12337114f529efa5a12a4