GNU bug report logs - #27427
26.0.50; Native line numbers lead to display error in company-mode popup

Previous Next

Package: emacs;

Reported by: Alexander Miller <alexanderm <at> web.de>

Date: Mon, 19 Jun 2017 16:51:02 UTC

Severity: normal

Found in version 26.0.50

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: alexanderm <at> web.de, 27427 <at> debbugs.gnu.org
Subject: bug#27427: 26.0.50; Native line numbers lead to display error in company-mode popup
Date: Sun, 25 Jun 2017 17:46:23 +0300
On 6/25/17 5:13 PM, Eli Zaretskii wrote:

> The displayed line number reflects the line of the buffer positions
> corresponding to what's on that screen line.  If none of the buffer
> positions appear on that screen line, it's the line of the buffer
> position(s) "covered" by the display string/overlay which generates
> the display.

It didn't look like this in the previous version. Might be considered a 
bit annoying, repeating the number several times.

BTW, by that logic, the last empty line should have a number as well: it 
does correspond to a buffer position.

> If what you see doesn't fit this description, please show a
> screenshot, and describe or show the code which puts the overlay that
> causes the display.

It does fit the description.

> I'm not sure I understand: are you saying that you've put the property
> in that case and it didn't have the expected effect?

Yes. Although I half expected it to have no effect in this case.

> Or are you
> saying that you don't have a position to put the property in that
> case? 

Also true, probably.

> If the former, can you tell on which buffer position you put
> the property, and perhaps show a simple reproducer?

(with-current-buffer (get-buffer-create "popup-test.el")
  (setq display-line-numbers t)
  (insert "aaaaaaa
aaaaaaa
aaaaaaa
aaaaaaa
aaaaaaa
")

  (let ((ov (make-overlay (point-max) (point-max))))
    (overlay-put ov 'after-string "bbbbbb\nbbbbbb\n")
    (overlay-put ov 'display-line-numbers-disable t)))

After that, the buffer popup-test.el shows the "bbbbbb" lines prepended 
with the empty line number columns. I'd rather they weren't there.




This bug report was last modified 7 years and 314 days ago.

Previous Next


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