GNU bug report logs - #34476
fluffy whitespace in the mode-line, despite it running off the screen

Previous Next

Packages: gnus, emacs;

Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>

Date: Thu, 14 Feb 2019 13:53:01 UTC

Severity: wishlist

Tags: fixed

Found in version 5.13

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #26 received at 34476 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: contovob <at> tcd.ie, 34476 <at> debbugs.gnu.org, jidanni <at> jidanni.org
Subject: Re: bug#34476: fluffy whitespace in the mode-line, despite it
 running off the screen
Date: Fri, 07 Aug 2020 13:41:15 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

>> +	  char c = ostring[i];
>> +	  if (!(c == ' ' && prev == ' '))
>> +	    {
>> +	      *s++ = c;
>> +	      prev = c;
>> +	    }

[...]

> Ouch!  This is Lisp converted into C, yes?

If that looks like Lisp to you...  :-)

> And it formats the mode-line twice: once in format-mode-line, then
> again in display_string, right?

No, display_string just displays the string, I think?

> You don't need all this inelegance.  After display_mode_element
> returns, you have all the glyphs it produced in it.glyph_row, so you
> can simply remove the unneeded space glyphs from the glyph row (and
> adjust the metrics accordingly).  Let me know if you need more
> detailed help in how to do that.

That seems like a lot more work, I think?  And I don't see how that
could be more efficient than just removing the characters from the C
string?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 4 years and 141 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.