unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#41984: 28.0.50; term.el's select-window call interacts badly with modeline
@ 2020-06-21 15:43 Herman, Géza
  2020-06-21 16:02 ` Eli Zaretskii
  2021-09-17 16:38 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 7+ messages in thread
From: Herman, Géza @ 2020-06-21 15:43 UTC (permalink / raw)
  To: 41984

I noticed that the call "(select-window win)" in term.el (in 
term-emulate-terminal) interacts badly with doom modeline. This 
select-window call confuses the modeline which is the active window, and 
it causes the terminal's modeline displayed as active, as soon as the 
terminal receives output, no matter which is the actual active window. 
And the real active window is displayed with an inactive modeline.

I found if I modify this "(select-window win)" line to "(select-window 
win t)", the bug doesn't happen anymore (I'm not sure whether it's a 
correct fix in all regards or not).

Here's my full description of the issue, with screenshot: 
https://github.com/seagle0128/doom-modeline/issues/355

Describe: When one window has an ansi-term, which constantly outputs 
some text, and another window has the focus, then doom-modeline behaves 
strange: the mode line of the focused window loses activity, and part of 
ansi-term's mode line becomes active.

Use this init.el:

---------------------------------------------

(require 'package)
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/"))
(add-to-list 'package-archives '("melpa-stable" . 
"http://stable.melpa.org/packages/"))
(package-initialize)

(unless (package-installed-p 'use-package)
   (package-refresh-contents)
   (package-install 'use-package)
)

(setq use-package-always-ensure t)

(eval-when-compile (require 'use-package))

(use-package doom-modeline
   :hook (after-init . doom-modeline-mode)
)

---------------------------------------------

Here are the repro steps:

* start emacs
* split windows with split-window-vertically
* execute ansi-term in one window, and enter this command into the 
shell: while true ; do echo Ize ; sleep 2 ; done
* move the cursor to the other window
* notice that the other window's modeline get activity (colored as so, 
as it supposed to be), but as soon as the terminal window has output, it 
loses it (colored as inactive). And the terminal window will have a 
weird colored modeline (half of it is active, the other half is inactive)





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-09-17 16:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-21 15:43 bug#41984: 28.0.50; term.el's select-window call interacts badly with modeline Herman, Géza
2020-06-21 16:02 ` Eli Zaretskii
2020-06-21 16:18   ` Herman, Géza
2020-06-21 16:30     ` Eli Zaretskii
2020-06-21 18:18       ` Herman, Géza
2020-06-21 19:03         ` Herman, Géza
2021-09-17 16:38 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).