GNU bug report logs - #23098
25.0.92; (recenter -1) can leave point in the middle of the window

Previous Next

Package: emacs;

Reported by: Jorgen Schaefer <jorgen.schaefer <at> gmail.com>

Date: Wed, 23 Mar 2016 18:41:01 UTC

Severity: normal

Found in version 25.0.92

Full log


View this message in rfc822 format

From: Jorgen Schaefer <jorgen.schaefer <at> gmail.com>
To: 23098 <at> debbugs.gnu.org
Subject: bug#23098: 25.0.92; (recenter -1) can leave point in the middle of the window
Date: Wed, 23 Mar 2016 19:40:27 +0100
Hello!

Evaluating the following code in "emacs -Q" leaves point in the middle
of the window, instead of at the end of the window as expected. Certain
modes (IRC) want to keep the buffer flushed at the end of the window,
this problem interferes with that behavior and causes very weird jumpy
scrolling.


(require 'cl)
(let* ((b (get-buffer-create "*Bug Repro*"))
       (w (selected-window))
       (l (window-height w))
       o)
  (set-window-buffer w b)
  (select-window w)
  (set-buffer b)
  (erase-buffer)
  (cl-dotimes (i (* l 2))
              (insert "foo\n"))
  (goto-char (point-min))
  (forward-line (+ l 2))
  (setq o (make-overlay (point) (point)))
  (overlay-put o 'after-string "\n")
  (goto-char (point-max))
  (recenter -1))


That is, if there is a multi-line overlay that would be shown only
halfway.

I have seen similar behavior with some forms of invisible text, but have
not been able to create reproduction steps for that.

Regards,
Jorgen


In GNU Emacs 25.0.92.1 (x86_64-unknown-linux-gnu)
 of 2016-03-14 built on loki.jorgenschaefer.de
Repository revision: 1b9d6163b023aaefd15d38ea28e968a113202402
System Description:	Debian GNU/Linux 8.3 (jessie)

Configured using:
 'configure --enable-checking --without-x 'CFLAGS=-ggdb3 -O0'
 LDFLAGS=-ggdb3'




This bug report was last modified 9 years and 88 days ago.

Previous Next


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