This ensures that the filename extension is always visible, and also is just a
nicer way to elide file and folder names in general.
Hmm, I don't know, I'm afraid this would make the filenames harder to recognize.
The file extension can always be guessed by looking at the file icon/preview. Advanced user could also add the Type column in detail view mode. And there is also the Information panel...
Also note that the file dialog uses right-elision as well, so that would need to be patched accordingly.
In my opinion, middle elision is actually more comprehensible for filenames than right-elision is. macOS Finder also uses middle elision here, for comparison.
I'll do the file dialogs as well for consistency.
Right-sided elision isn't all that useful considering the filename that's being elided is usually pretty long already. This patch, however, would enable the user to always see the extension (which is a huge deal, especially if we're dealing with something malicious).
So +1 from me (will you be doing file dialogs in a separate patch or as part of this one?)