GNU bug report logs - #43469
28.0.50; window-text-pixel-size returns incorrect value when line-prefix is set

Previous Next

Package: emacs;

Reported by: Yuan Fu <casouri <at> gmail.com>

Date: Thu, 17 Sep 2020 16:04:01 UTC

Severity: normal

Found in version 28.0.50

Done: Yuan Fu <casouri <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


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

From: Yuan Fu <casouri <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 43469 <at> debbugs.gnu.org
Subject: Re: bug#43469: 28.0.50; window-text-pixel-size returns incorrect
 value when line-prefix is set
Date: Fri, 18 Sep 2020 13:05:15 -0400

> On Sep 17, 2020, at 1:32 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:
> 
>> From: Yuan Fu <casouri <at> gmail.com>
>> Date: Thu, 17 Sep 2020 12:03:35 -0400
>> 
>> (progn (insert "xxxxxxxxxxxxxx")
>>       (print (car (window-text-pixel-size
>>                    nil (line-beginning-position) (line-end-position))))
>>       (put-text-property (line-beginning-position) (line-end-position)
>>                          'line-prefix "   ")
>>       (print (car (window-text-pixel-size
>>                    nil (line-beginning-position) (line-end-position)))))
>> 
>> Prints first 98, then 119
> 
> Why do you think this is a bug?

I thought the pixel width shouldn’t include the line-prefix?

Yuan



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

Previous Next


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