Diffusion Kate 47cf54ddf423

Show partial path in Tabswitcher Ctrl+Tab list to distinguish equally named…

Authored by gregormi on Oct 14 2018, 5:19 PM.

Description

Show partial path in Tabswitcher Ctrl+Tab list to distinguish equally named files

Summary:
Currently, when there are equally named files open, e.g. some README.md files, then with Ctrl+Tab it is not possible to find the correct one instantly.

Screenshot BEFORE:

This chnage extends the Ctrl+Tab list with a new column to the left of the filename. It contains the partial paths (the common prefix of the strings are stripped away to avoid to show redundant information) to the file in grey color.

Screenshot AFTER:

If the user bothers to use the mouse, a tooltip can be revealed which shows the full path:

ISSUES:

  • Auto-sizing of the columns does not work yet (see the first file which is located in "asynckit" but only "asyn" is displayed. Strange. I havn't figured out how to handle this properly.

Test Plan:

  • Test with documents that have no associated file: Works: no file path is shown:

  • Add a file with a different base directory and see how the prefix changes accordingly (this is also the special case where the prefix is only of length 1 and is therefore kept):

Reviewers: Kate, VDG, cullmann

Reviewed By: Kate, cullmann

Subscribers: cullmann, abetts, thsurrel, dhaumann, ngraham, kwrite-devel

Tags: Kate

Differential Revision: https://phabricator.kde.org/D16054

Details