When loading a remote file, a new message appears at the top. When the URL is long and does not contain spaces, the loading message causes the whole window to resize. When the message disappears, the window is not sized back to its original size. The URL probably should be elided.
One simple approach is to show only the filename (QUrl::fileName()) instead of the entire QUrl::pathOrUrl(). KMessageWidget from kdelibs does not support squeezing, nor can we squeeze a priori to exactly fit the widgets (since we post the message in a document, not a view). Would the proposed change above reflect a fix that is good enough?
Same goes with any file nested in a series of folders. Given the maximum length of 255 characters per full path, kate should behave and not resize in all cases. Maybe truncate the path (or URL) to the maximum amount of visible columns? Worst case, add a scrollbar, or allow the message to wrap. Non-broken strings are wrapped in the editor anyway, why not apply the same algorithm to the message?
Word wrap of the message widget is enabled. @Aurelien: Is there anything we can do? My current solution would be to just show the fileName instead of the full path. Eliding the url depending on the width does not work, since we just pass a QString to the KMessageWidget ;)
Not much can be done at KMessageWidget level I am afraid. I would say the best thing to do is to elide the url with KStringHandler::csqueeze(). We can assume the user already knows which url he is opening, so he does not need the complete url in the message.
Ok, this is fixed in KDE 4.11 by just using the fileName(). In addition, the fileName is a link, if you click on or hover over it, a tooltip shows the complete path. I hope this solution is ok. Due to string freeze we can not simply backport to KDE 4.10. If you think that it's deadly needed, I'll ask the translators, though.