Closed anka-213 closed 6 years ago
I'm getting this too. I don't get it with magit but I can reproduce it consistently in mu4e. I have a bookmark for mu4e that has a particularly long search query, which are displayed in the global segment.
My spaceline segments are ordered something like this:
buffer-modified | buffer-id | flycheck | version-control | erc-track | process |
When I use this query the global segment disappears as well as all those to the left of it up to the buffer-id resulting in this:
buffer-modified | buffer-id |
My guess is that this is some kind of overflow problem then because it happens consistently whenever the global segment expands to be greater than the available empty space.
I see that the spaceline--adjust-to-window will automatically hide segments if the modeline is longer than the window width. Probably the problem lies somewhere there?
I also found that setting spaceline-responsive to nil, which disables the above behaviour, solves the problem.
@anka-213 does setting spaceline-responsive solve it for you too? If so, then we might both be looking at the same issue.
In the most recent version, the global segment has the lowest possible priority and will be among the first segments hidden. I just tried making an artificially long global segment and I'm left with much more than the buffer ID segments, also the leftmost (highlighted) segment, major mode, minor mode, encoding, buffer position and HUD are all visible.
I've tried with the lastest version and setting spaceline-responsive back to t. I have the same behaviour as I mentioned above where the segments get hidden and only display again if I run (spaceline-compile).
Do I understand spaceline--adjust-to-window correctly in that it should automatically show the hidden segments again once the total-length decreases? If so, I'm not sure why but this doesn't seem to be happening, at least in my case.
I don't know if it makes a difference but I'm building my own mode-line with spaceline-install, that has a few custom segments (mostly just some ideas that I liked from domtronn/spaceline-all-the-icons.el). When I get a chance I'll see if I can replicate the issue with the default mode-line as well.
If you use spaceline-install directly, maybe you need to adjust the priorities so that the segments you expect to be hidden first, will be. By default everything has the same priority so spaceline will be free to choose arbitrarily.
I've changed my spaceline config so that it consists only of this:
(require 'spaceline-config)
(spaceline-spacemacs-theme)
If the global segment gets extremely long then it gets hidden, as expected, but it doesn't get unhidden again afterwards unless I run spaceline-compile.
What conditions need to be met in order for it to be unhidden automatically?
Yeah okay, I see the bug now. Lengths are updated when the segments are rendered, but segments that are hidden won't be rendered. This feature was designed more for varying window widths than varying segment lengths.
Please try https://github.com/TheBB/spaceline/pull/188
That works perfectly! The segments now automatically display again after they've been hidden.
Thank you so much for the time and effort you've put into investigating and fixing this.
No problem, thanks for testing :-). If no problems show up I will merge in a couple of days.
I am on the development version 0.300 and I am still having this problem. Was this supposed to be fixed?
The modeline looks as expected for me in both Manjaro
and Windows
.
On the latest Spacemacs develop
branch:
Use timeclock-mode-line-display in default bindings (#14713) https://github.com/syl20bnr/spacemacs/commit/d72e5129930f0f96805da96b95ca4166e02f80ae
with updated packages.
#### System Info :computer: - OS: gnu/linux - Emacs: 27.2 - Spacemacs: 0.300.0 - Spacemacs branch: develop (rev. d72e51299) - Graphic display: t - Distribution: spacemacs - Editing style: vim - Completion: helm - Layers: ```elisp (emacs-lisp git helm multiple-cursors treemacs) ``` - System configuration features: XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB NOTIFY INOTIFY ACL GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD JSON PDUMPER LCMS2 GMP
#### System Info :computer: - OS: windows-nt - Emacs: 27.2 - Spacemacs: 0.300.0 - Spacemacs branch: develop (rev. d72e51299) - Graphic display: t - Distribution: spacemacs - Editing style: vim - Completion: helm - Layers: ```elisp (auto-completion autohotkey c-c++ emacs-lisp (git :variables) helm html lsp markdown multiple-cursors (org :variables org-agenda-files '("c:/Users/username/org/")) python shell spell-checking syntax-checking treemacs version-control) ``` - System configuration features: XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY W32NOTIFY ACL GNUTLS LIBXML2 HARFBUZZ ZLIB TOOLKIT_SCROLL_BARS MODULES THREADS JSON PDUMPER LCMS2 GMP
I am on Ubuntu 20.04 Using i3wm (not that I think that matters)
Staging is fine:
Its when I enter the commit interface that the spaceline get clobbered and then doesn't come back.
Here is my .spacemacs file (extension changed to allow me to uplod to github) spacemacs.txt
Description :octocat:
Every time I make a commit using magit (
<spc> g s
and thenc c
), the powerline gets destroyed and replaced with a line containing just the title of the major-mode.Reproduction guide :beetle:
git
layer in spacemacs)<SPC> g s
)c c
in the status window)Observed behaviour: :eyes: :broken_heart:
After starting a commit the powerline is gone. It stays gone even after committing.
The only ways I've found to restore the powerline are either to restart emacs or running
M-x spaceline-compile
.Expected behaviour: :heart: :smile:
The powerline should stay in its place. Or at least be restored after finishing a commit.
System Info :computer: