Skip to content
  • Gregor Mi's avatar
    Show partial path in Tabswitcher Ctrl+Tab list to distinguish equally named files · 47cf54dd
    Gregor Mi authored
    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:
    
    {F6312987}
    
    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:
    
    {F6312988}
    
    If the user bothers to use the mouse, a tooltip can be revealed which shows the full path:
    
    {F6329497}
    
    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:
    
    {F6313022}
    
    * 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):
    
    {F6326454}
    
    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
    47cf54dd