[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Overlays disappearing during line-by-line scrolling

From: Ralf Angeli
Subject: Overlays disappearing during line-by-line scrolling
Date: Thu, 16 Jun 2005 19:52:18 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

It seems that Emacs has problems keeping the display of multi-line
overlays correct when scrolling line by line.  Here is an example you
can use in an Emacs started with `emacs -Q':

  (switch-to-buffer (get-buffer-create "*test*"))
  (set (make-local-variable 'scroll-conservatively) 1000)
  (dotimes (i 100)
    (insert "..........................................................\n"))
  (goto-char (point-min))
  (let ((i 2))
  (while (<= i 98)
    (let ((ov (make-overlay (1+ (line-beginning-position i))
                            (line-beginning-position (+ i 2)))))
      (overlay-put ov 'display "XXX\nXXX"))
    (setq i (+ i 6))))
  (goto-char (point-max)))

After executing the code move point upwards with `C-p'.  After point
hit the top of the window further movement will scroll the buffer line
by line.  This will make the overlays disappear occasionally,
i.e. instead of the "XXX\nXXX" strings one will see the "...." strings

Note that this happens only if the overlays start and stop within a
line.  That means if you remove the `1+' call in the code above the
effect does not occur.

I found this bug actually while scrolling through a buffer with folded
LaTeX macros while scrolling downwards (not upwards) but was not able
to construct a testcase which showed the behavior with downward

In GNU Emacs (i686-pc-linux-gnu, GTK+ Version 2.6.7)
 of 2005-06-16 on neutrino
Distributor `The XFree86 Project, Inc', version 11.0.40300001
configured using `configure '--with-gtk''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US
  locale-coding-system: iso-latin-1
  default-enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  mouse-wheel-mode: t
  tooltip-mode: t
  auto-compression-mode: t
  menu-bar-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  line-number-mode: t
  next-error-follow-minor-mode:  Fol

Recent input:
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> C-x k <return> C-_ <down> <down> 
C-x C-e <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> C-p C-p C-p C-p C-p C-p C-p C-p 
C-p C-p C-p C-x k <return> C-n <return> C-p C-p C-p 
C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p M-x r e p o 
r t - e m a <tab> <return>

Recent messages:
Mark set
Mark set
5901 [2 times]
Undo! [5 times]
Loading emacsbug...done

reply via email to

[Prev in Thread] Current Thread [Next in Thread]