smart-mode-line
smart-mode-line copied to clipboard
Emacs jumps up and gets out of sync with cursor in terminal mode (emacs -nw)
Hi! I've been having an issue with Emacs running in the terminal where the contents of the buffer suddenly jump up by one line and get out of sync with where the cursor is. When this happens, I can fix it by selecting all the text in the buffer, but then periodically it'll jump back up and break again. I've finally tracked it down to being related to smart-mode-line - when I uninstall it, everything is back to normal.
I don't know if it's some poor interaction with other packages. I'm not using any custom themes. It seems likely that it's something to do with my configuration though, since I doubt something like this could remain this broken while other people are using it.
It seems that I can reliably trigger it by switching back to the graphical Emacs client (I'm running Emacs in daemon mode).
I would appreciate any pointers in debugging what's going wrong with sml. Thanks!
Emacs version is 26.1, smart-mode-line is from melpa, so latest version. It's actually been happening for years probably, but I never spent the time to figure out what it was (started using nano and zile from the terminal instead...)
I have the same issue. My hunch is that it's somehow feeding extra characters for that line to the output and it's causing wrapping/scrolling at the display side.
Huh, wonder if it's something to do with the size of the terminal and/or the scroll bar reducing the actual visible area? Are you also using gnome-terminal? I haven't tried other terminals to see if anything is better there but that might be a good place to investigate (I've just disabled sml for the time being).
Edit: Sorry this got posted twice. My browser was acting up---I've deleted the duplicates.
My configuration is weird enough that it's hard to say---I really should experiment to see where I can reproduce it. I generally remotely work on Linux hosts from my Windows laptop via terminal.
I use the Cygwin mintty terminal, ssh into a Centos Linux host, run tmux, and then emacsclient -c into a graphical emacs I've started in VNC. I have a super-wide monitor, so I often have 4 or more emacs windows open split horizontally. Then I have weird utf-8 characters for diminished modes, so who knows what's going on? It only happens part of the time.
I'll try to reproduce it. One problem is that when it crops up, I am often unable to take screenshots because of confidentiality of the work I'm doing... ☹️