powerline icon indicating copy to clipboard operation
powerline copied to clipboard

Fix and simplify detection of selected window

Open stiell opened this issue 8 years ago • 8 comments

Remove the stack of minibuffer selected windows. Instead consider (minibuffer-selected-window) the selected window whenever (selected-window) is a minibuffer. This seems to be consistent with what Emacs considers the selected window when choosing the mode line face.

Also update all mode lines whenever a new window is selected, as either the previously or the newly selected window would in some cases not update, resulting in either two or zero windows apparently selected.

Fixes #120

I've tested this using Emacs 24.5. Moving between frames and windows including nested minibuffers I couldn't find any inconsistencies.

stiell avatar Aug 09 '16 12:08 stiell

Any chance this can be merged?

manuel-uberti avatar Nov 06 '16 09:11 manuel-uberti

Actually, I am afraid but this PR doesn't fix it for me. shot

Running GNU Emacs 26.0.50.1 (x86_64-debian-linux-gnu, GTK+ Version 3.14.5) of 2016-11-09 on Debian Jessie.

manuel-uberti avatar Nov 09 '16 20:11 manuel-uberti

That looks to me like a different bug in the particular theme you are using.

stiell avatar Nov 09 '16 21:11 stiell

It happens with the default powerline theme as well.

manuel-uberti avatar Nov 09 '16 21:11 manuel-uberti

Here's a screenshot with the default theme: shot

manuel-uberti avatar Nov 09 '16 21:11 manuel-uberti

Same display bug on Windows 10, by the way: GNU Emacs 25.1.1 (x86_64-w64-mingw32) of 2016-09-17

manuel-uberti avatar Nov 15 '16 11:11 manuel-uberti

@manuel-uberti does this fix your problem?

milkypostman avatar Oct 07 '17 15:10 milkypostman

As reported above, it didn't.

Although I haven't tried in a while since I move to a custom mode line and a different theme. :)

manuel-uberti avatar Oct 07 '17 15:10 manuel-uberti