Closed Stebalien closed 6 years ago
Hum, that needs investigation.
Does it only happen with xwidget / web buffers, or with any buffer with a long name ?
Any buffer with a long name. For me, the cutoff is around 60 characters.
Any updates on this?
It should be enough to give the buffer name segment (and other segments that tend to be long) a lower priority, so that it is the first candidate for hiding.
I've made an update that changes the priority of this segment. It should be among the first to hide now.
It works! Thanks for the fix!
How to customize priority for buffer name after 07235fe45569c6fa669ba6426b806b8c81b26d65? I want to see file name as far as possible
Hang on, we still haven't decided on what meaning the priority keyword should have.
But if you're interested the current version, you can set it to –10 or something similarly low.
I apologize for this dumb question, but to echo @osv, what is the easiest way to customize the priority of a segment? The buffer-id
segment begin hidden is a mild nuisance for me, too. It happens to me quite often when switching workspaces on macOS. Deleting other windows (in emacs parlance) brings it back, then I can resplit the frame to get back to the mode line displaying as intended.
@osv @acowley The question isn't dumb.
To set the priorities the way you want you can copy and paste the spaceline definition in spaceline-config.el. Copy the spaceline-spacemacs-theme function if you are using Spacemacs, spaceline-emacs-theme if you are using vanilla Emacs (don't forget to copy spaceline--theme as well).
Then just rename the functions (or extract the code), modify it and use it from your dotfile.
If you do that keep in mind that the priority sorting algorithm might change in a near future, so you'll have to tweak it of you notice breakings.
By the way, in Spacemacs you can display in the echo area the name of the file the buffer is visiting by pressing <SPC> f y
.
This should be fixed now.
When a long buffer name segment is hidden, the buffer name segment on all other windows (and all segments after that) are also hidden.
Note: This only happens when a long buffer name is hidden. When a short buffer name is hidden, segments in other windows aren't affected.
Screen Shots
Before switching to a buffer with a long name
After switching