[Top][All Lists]

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

Re: Overlays disappearing during line-by-line scrolling

From: Ralf Angeli
Subject: Re: Overlays disappearing during line-by-line scrolling
Date: Sun, 10 Jul 2005 18:20:00 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

* Richard Stallman (2005-06-17) writes:

> I wrote this patch which makes line-move-1 use vertical motion when
> overlays are around.  It fixes the reported bug, but the display bug
> is still there: using goto-char to move to position 3011 (when that
> was above the screen) makes the overlays disappear.

The change in `line-move-1' does not seem to work anymore.  I can see
the overlays in the original testcase disappear again.  Here is the
testcase for your reference:

  (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)))

You have to move point upwards in order to see it.

I managed to make it work again by extending the region to check for
overlays to the full line before point (including the newline
character preceding it).  But this will work only if `scroll-margin'
is zero.  If its value is greater than zero, the overlay detection
fails again.

I am currently not sure if `line-move-1' is the correct location for
fixing this bug.  Maybe the code involved in scrolling would be more


reply via email to

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