all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Nicolas P. Rougier (inria)" <nicolas.rougier@inria.fr>
Cc: emacs-devel@gnu.org
Subject: Re: Inconsistent margin background color in minibuffer
Date: Fri, 02 Aug 2024 09:54:46 +0300	[thread overview]
Message-ID: <868qxfwh1l.fsf@gnu.org> (raw)
In-Reply-To: <m2sevraq0a.fsf@inria.fr> (nicolas.rougier@inria.fr)

> From: "Nicolas P. Rougier (inria)" <nicolas.rougier@inria.fr>
> Date: Tue, 30 Jul 2024 16:55:17 +0200
> 
> 
> I'm experimenting with the minibuffer and I get some problem setting the
> margin (not fringe) background color. Here is a simple example:
> 
> (defun setup-minibuffer ()
>   (setq-local truncate-lines t)
>   (set-window-margins nil 10 10)
>   (set-window-fringes nil 0 0)
>   (goto-char (point-min))
>   (face-remap-set-base 'default '(:background "#cccccc")))
> 
> (add-hook 'minibuffer-setup-hook #'setup-minibuffer)
> 
> (completing-read "Very long prompt: "
>                  nil nil nil
>    "Very long line that should trigger truncation (hopefully), else, reduce window width.")
> 
> When the point is at the start of the prompt, margin background color is
> white (default bg color I guess) but when the point is at the end of the
> entry, margin background color is "#cccccc".
> 
> Is that the expected behavior? If yes, how can I force the margin
> background color to use the remapped default face ?

It's a bug, and a very old one.  When the feature of showing
truncation/continuation glyphs on GUI frames was added to Emacs, we
failed to consider the case where there are display margins with
nothing in them (i.e., the margin area is empty) and the default face
is remapped.

I have now fixed that on the master branch.  While at that, I also
fixed a minor related inconsistency: the truncation/continuation
glyphs should use the remapped default face for their background (in
your case, the truncation glyphs should have the same background color
of "#cccccc"), not the default frame background.



  reply	other threads:[~2024-08-02  6:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-30 14:55 Inconsistent margin background color in minibuffer Nicolas P. Rougier (inria)
2024-08-02  6:54 ` Eli Zaretskii [this message]
2024-08-02  7:24   ` Nicolas P. Rougier (inria)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=868qxfwh1l.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=nicolas.rougier@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.