GNU bug report logs -
#30553
26.0.91; underline appears beneath line-spacing rather than beneath text
Previous Next
Reported by: Aaron Jensen <aaronjensen <at> gmail.com>
Date: Tue, 20 Feb 2018 18:18:02 UTC
Severity: minor
Found in version 26.0.91
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #55 received at 30553 <at> debbugs.gnu.org (full text, mbox):
> From: Aaron Jensen <aaronjensen <at> gmail.com>
> Date: Sun, 25 Feb 2018 14:09:46 -0800
> Cc: Alp Aker <alptekin.aker <at> gmail.com>, 30553 <at> debbugs.gnu.org
>
> I changed my mind on this after discovering that these variables do
> not work as buffer local variables. Whatever the current buffer has it
> set to causes all other visible buffers to draw in that way, which
> causes underlines to jump around if they're set differently in
> different buffers.
>
> Please see attached patch. I don't have a windows or linux machine to
> test on, so if someone could do that it would be appreciated. There
> are some subtle differences in the original code which I tried to
> respect.
I'm not sure I see the point of adding yet another variable. Don't
you see the same problem with local values of that variable, like you
saw with the 2 existing ones?
In general, you cannot assume in display code that buffer-local
variables have their expected values, because redisplay needs to
redraw windows other than the selected one, and when it does so, the
window's buffer is not made the current one in the full sense of the
word. What you saw is the display engine using the value from the
last buffer that was current before a redisplay cycle. So you need to
explicitly access buffer-local values by calling buffer_local_value;
see the examples of that in xdisp.c.
If we want to allow users to make these variables buffer-local, the
best way is to modify the display code to use their buffer-local
values. That would be a cleaner solution, I think.
But anyway, what is the use case where you need different values for
these variables in different buffers? These variables were introduced
to solve problems with semi-buggy fonts, and these problems are not
limited to a single buffer. Also, if you set these variables to
ignore the line-spacing, it will produce a reasonable display in a
buffer without any line-spacing at all, so I wonder why you needed to
make these local. Can you explain?
This bug report was last modified 7 years and 77 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.