[Top][All Lists]

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

Re: Cursor positioning with `after-string' overlays

From: Eli Zaretskii
Subject: Re: Cursor positioning with `after-string' overlays
Date: Sat, 03 Apr 2010 10:26:41 +0300

> From: Stefan Monnier <address@hidden>
> Date: Fri, 02 Apr 2010 21:21:09 -0400
> Cc: address@hidden
> >> I can imagine using the same kind of message for in-buffer completion.
> > Then you need to use the "integer as `cursor' property value"
> > feature.  I.e., don't just set the property's value non-nil, set it to
> > the integer number that specifies how many buffer positions are
> > ``covered'' by that cursor positions.  That's what CUA Mode does in
> > cua-rect.el.  Integer property values do override the "exact match for
> > point always wins" strategy.
> Yes, that sounds OK.  But note that (except for when the after-string is
> at EOB) there's basically always a "exact match for point", so that
> basically means that the use of a value t for the `cursor' property will
> simply not work any more and might just be dropped.

Not necessarily: when the overlay (or text property) has a `display'
property, the value of the property is displayed _instead_ of the
text.  In that case, there might be no exact match for point, and the
value `t' still has its merit.

> Just that it places the cursor on the "before" or "after" position of
> (after|before|display)-strings depending on the
> stickiness/insertion-type of the corresponding overlay/text-property.

Okay, I will try to look into this.

reply via email to

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