If I select "hello.txt" and start inline renaming, only "hello" will be selected/highlighted, which is good. However, If I select "hello.rst" and start inline renaming, the whole "hello.rst" will be selected/highlighted, which is a little inconvenient or annoying. The same goes for "hello.kcrash", "hello.vdi", etc.
I don't know the internal logic of what part should be selected when starting inline renaming, but from average users' perspective, this inconsistency looks more like bug than expected behavior.
Steps to Reproduce:
1. Select "hello.rst" and start inline renaming
the whole "hello.rst" is selected/highlighted
only "hello" is selected, just like the case of "hello.txt"
Created attachment 71824 [details]
The (confusing) highlight after starting inline renaming in compact view.
This screenshot shows one potential problem of inline renaming selecting the whole part of "hello.rst" in compact view. It is not easy to tell from the screenshot that I have started inline renaming, because it could easily give the wrong impression that I just select that file without doing any other operation.
Thanks for the report, I understand but it is not as trivial as it seems to be: In initial versions of Dolphin I just selected everything until to the last point. But this resulted in issues with e.g. *.tar.gz extensions. I changed the strategy to select everything until the first point, but people complained that for e.g. my.picture.january.jpg only "my" gets selected...
So now I use KMimeType::extractKnownExtension(text) to check all known extensions and select only the rest. Probably a fallback to solution #1 (select everything except the last extension) should be done if no known extension is given. What do you think?
Thanks for the explanation. I now see the trouble you are facing.
For me, adding strategy #1 as the fallback strategy seems to be a good enough solution. I'm also fine if you decide to leave this report open for some time to gather more feedback from more users before making the change.
Git commit 6207525f03e9a66f714ca1fe716e8d8772d04927 by Peter Penz.
Committed on 16/06/2012 at 22:51.
Pushed by ppenz into branch 'master'.
Renaming: Don't select unknown extensions
If a file with an unknown extension gets renamed, it is assumed
that the letters after the last point represent the extension and
won't be selected.
M +8 -1 dolphin/src/kitemviews/kstandarditemlistwidget.cpp