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

When minibuffer window is active, background modeline in (previously) active window is off #45

Closed
apc opened this issue Jan 10, 2023 · 11 comments

Comments

@apc
Copy link

apc commented Jan 10, 2023

I'm not sure what controls the look of the modeline in the active window when the minibuffer window is active, but something seems off. I think the issue is that the right fringe background color is not modified, unlike the background color of the rest of the modeline:

image

(This is using the built-in dichromancy theme, with fringe-mode set to default.)

It's even more noticeable if you increase the right fringe (here I set the right fringe to 80):

image

I can reproduce in vanilla emacs after installing nano-modeline (by calling package-install) and evaluating the following buffer:

(fringe-mode '(4 . 80))
(setq nano-modeline-position 'bottom)
(nano-modeline-mode)

image

(For clarity, the screenshot is taken after splitting the frame in two and calling switch-to-buffer.)

@rougier
Copy link
Owner

rougier commented Jan 10, 2023

I do not modify the fringe, that might be the reason. But with vanilla emacs / default modeline, you have the same problem, do you?

@apc
Copy link
Author

apc commented Jan 10, 2023

I'm not sure I understand. In vanilla emacs with the default modeline, the modeline has a constant background even when the fringe has a different color from the default background. E.g., trying out

(fringe-mode '(4 . 80))

and then calling switch-to-buffer gives me this:

image

Note the difference with what happens after installing nano-modeline, positioning the modeline at the bottom, activating nano-modeline-mode, and then calling switch-to-buffer:

image

The background only looks like this when the minibuffer is active. Otherwise, it looks as you'd expect:

image

From what I can tell, the problem is that when the minibuffer is active, part of the modeline is using the mode-line-inactive but the bit above the fringe on the right continues to use the mode-line-active face.

image

And changing the color of the fringe doesn't change the color of the segment of the modeline right above the right fringe, e.g.:

image

@apc
Copy link
Author

apc commented Jan 10, 2023

PS: more evidence that this seems unrelated to the background color of the fringe:

image

@rougier
Copy link
Owner

rougier commented Jan 11, 2023

I see. I think the problem is that the modeline stops at the right border instead of the right fringe border. I'll look into that. Or if you want to experiment, you can have a look at line 490 and pixel specifications. Maybe replacing right-margin with right-fringe could do the trick.

@apc
Copy link
Author

apc commented Jan 11, 2023

That almost does the trick, but not quite. When there is line number info on the right, sometimes you still see a bit of the different color e.g.:

image

@aaronjensen
Copy link
Contributor

aaronjensen commented Jan 11, 2023

@apc see if you can reproduce it with my fork: https://github.com/aaronjensen/nano-modeline/blob/master/nano-modeline.el

I don't vary the background color at all, so I don't know if I have the problem and just can't see it or not.

@apc
Copy link
Author

apc commented Jan 12, 2023

@aaronjensen yes, I get the same behavior. From what I can tell, the problem is visible only when the faces mode-line and mode-line-inactive have different background colors. The faces nano-modeline-active and nano-modeline-inactive are inheriting the background colors from those two, and when the modeline doesn't extend all the way to the end of the fringe, you still see the background color of the mode-line face over the fringe.

@rougier
Copy link
Owner

rougier commented Feb 2, 2023

Isn't it the window divider that you see? Can you try to change the window-divider face to yellow to be sure?

@apc
Copy link
Author

apc commented Feb 3, 2023

I'm pretty sure it's not the window-divider. I think it's the scroll-bar.

image

Look at the difference when I turn off scroll-bar-mode:

image

@rougier
Copy link
Owner

rougier commented Feb 3, 2023

Can you try aligning with scroll-bar instead of left-margin?

@rougier
Copy link
Owner

rougier commented Apr 30, 2023

I might be fixed with the new simpler branch. Coudl you give it a try?

@rougier rougier closed this as completed Apr 30, 2023
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

No branches or pull requests

3 participants