Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix and simplify detection of selected window #134

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

stiell
Copy link

@stiell stiell commented Aug 9, 2016

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.

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 milkypostman#120
@manuel-uberti
Copy link

Any chance this can be merged?

@manuel-uberti
Copy link

manuel-uberti commented Nov 9, 2016

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.

@stiell
Copy link
Author

stiell commented Nov 9, 2016

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

@manuel-uberti
Copy link

It happens with the default powerline theme as well.

@manuel-uberti
Copy link

Here's a screenshot with the default theme:
shot

@manuel-uberti
Copy link

manuel-uberti commented Nov 15, 2016

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

@milkypostman
Copy link
Owner

@manuel-uberti does this fix your problem?

@manuel-uberti
Copy link

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. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants