all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: visibility of overlays at end of buffer
@ 2006-02-24  4:54 Chong Yidong
  0 siblings, 0 replies; only message in thread
From: Chong Yidong @ 2006-02-24  4:54 UTC (permalink / raw)


> With emacs -Q evaluate ...

> (get-buffer-create "*over*")
> (defvar bar-over)
> (with-current-buffer "*over*"
>   (delete-region (point-min) (point-max))
>   (insert "foo\n")
>   (let ((at (point)))
>     (insert "bar\nbar\nbar\n")
>     (setq bar-over (make-overlay at (point-max))))
>   (overlay-put bar-over 'invisible t))
> (defun bar-over ()
>   (interactive)
>   (overlay-put bar-over 'invisible (not (overlay-get bar-over 'invisible))))
> (global-set-key [(control meta z)] 'bar-over)
>
> ... and enter buffer *over*.  On my system
>
> - with the cursor before "foo" C-M-z never displays / hides the "bar"s,

This can be fixed by making overlay-put tell redisplay that the window
is changed.

*** emacs/src/buffer.c.~1.498.~	2006-02-20 23:20:14.000000000 -0500
--- emacs/src/buffer.c	2006-02-23 23:51:23.000000000 -0500
***************
*** 4090,4095 ****
--- 4090,4097 ----
  	      == OVERLAY_POSITION (OVERLAY_END (overlay))))
  	Fdelete_overlay (overlay);
      }
+ 
+   windows_or_buffers_changed++;
    return value;
  }
  \f

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-02-24  4:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-24  4:54 visibility of overlays at end of buffer Chong Yidong

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.