I'm using XEmacs 21.4.12 on MacOSX. I've marked an extent in the buffer
invisible and applied an end-glyph to it:
(defun harmonia-code-view-set-extent-visible-p (extent visiblep
&optional ellipses)
(set-extent-property extent
'invisible
(not visiblep))
(set-extent-end-glyph extent (and (not visiblep)
(if ellipses
(make-glyph ellipses)
(make-glyph "...")))))
When I then click on the glyph with the mouse, the cursor jumps to
character position 0 in the buffer.
I've tracked this down to event-closest-position() returning nil in
default-mouse-track-set-point-in-window(). Event-closest-position()
returns nil when its call to event_pixel_translation() (C code) tells
it that the bufp argument is 0. That happens because
pixel_to_glyph_translation() tells it that ret_bufp is 0. Beyond that
is a really complicated function in redisplay.c. :)
The window has a menu, no toolbar, is a single buffer, and shows a
modeline. The glyph in question can be anywhere in the visible buffer
and shows the same behavior. The invisible extent covered by this glyph
has quite a bit of text in it, but the glyph is only 3 characters and
resides all on one line.
Ideas?
Andy
-----------
Andrew Begel
Ph.D. Candidate
Computer Science Division
University of California, Berkeley
Show replies by date