Bug 441340 - Tabbar incorrectly displays filenames containing ampersand
Summary: Tabbar incorrectly displays filenames containing ampersand
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: 21.08.0
Platform: Other Other
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-22 06:40 UTC by Kishore Gopalakrishnan
Modified: 2021-08-23 16:49 UTC (History)
0 users

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 Kishore Gopalakrishnan 2021-08-22 06:40:06 UTC
SUMMARY
When the name of a text file contains an ampersand (&) and it is opened in Kate, the name is incorrectly shown without the ampersand in the tabbar.

STEPS TO REPRODUCE
1. Make sure 'Settings > show tabs' is enabled.
2. Open a text file called 'terms&conditions.txt' in Kate
3. Press the 'Alt' key

OBSERVED RESULTS
The document name in the tabbar is shown as 'termsconditions.txt'. Pressing 'Alt' underlines the letter 'c', confirming that the ampersand in the document name has been interpreted as an Alt-accelerator.

EXPECTED RESULTS
The document name should be shown correctly in the tabbar with the ampersand.

SOFTWARE VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.22.4
KDE Frameworks Version: 5.85.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Also reproducible on KDE Neon unstable (updated today)
Comment 1 Bug Janitor Service 2021-08-22 10:32:20 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kate/-/merge_requests/475
Comment 2 Jan Paul Batrina 2021-08-23 16:49:53 UTC
Git commit e01219cc00107d3864c2ac1487ea54f8c445fcde by Jan Paul Batrina.
Committed on 23/08/2021 at 05:39.
Pushed by cullmann into branch 'master'.

Escape shortcut mnemonic markers (&) in tab texts

By default, automatic accelerators are enabled
(at least in KDE), and thus '&' characters
in tab names are erroneously treated as requests
for accelerators.

M  +8    -2    addons/search/plugin_search.cpp
M  +4    -1    kate/katetabbar.cpp
M  +4    -1    kate/kateviewspace.cpp

https://invent.kde.org/utilities/kate/commit/e01219cc00107d3864c2ac1487ea54f8c445fcde