GNU bug report logs -
#21750
show-paren-mode erroneously highlights the left margin
Previous Next
Full log
Message #8 received at 21750 <at> debbugs.gnu.org (full text, mbox):
> Date: Sat, 24 Oct 2015 19:28:24 +0200
> From: Hinrik Örn Sigurðsson
> <hinrik.sig <at> gmail.com>
>
> Hi there. I discovered that under certain conditions, show-paren-mode
> will highlight the entire left margin of the window when one of the
> parentheses is located at the beginning of a line. If you do "M-x
> eval-buffer" on the following code, it will reproduce the issue in
> emacs -Q (in both the terminal and GUI):
>
> (linum-mode)
> (custom-set-faces
> '(linum ((t (:foreground "black" :weight bold)))))
> (show-paren-mode)
>
> It happens when linum-mode (or nlinum-mode) is active, but only if the
> 'linum face has been customized. Attached is a screenshot
> demonstrating the overzealous highlighting.
I think this is a side effect of the general feature whereby an
overlay string "inherits" the face of the surrounding buffer text.
It doesn't matter whether the overlay string is displayed in the
window's display margin or in the text area.
I can understand how this could be unexpected in this particular case,
and might look like a bug, but it's actually the display engine
functioning as designed. Resetting the face of the overlay string
back to the default might disrupt lots of existing code.
This bug report was last modified 9 years and 67 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.