help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Overlay after-string with cursor (Stefan Monnier)


From: Stefan Monnier
Subject: Re: Overlay after-string with cursor (Stefan Monnier)
Date: Sun, 11 Aug 2019 18:32:39 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>> You can control where the cursor is displayed in the after-string, with
>> the `cursor` property.  Doing in it such a way that it gives the
>> illusion that you can put the cursor "wherever you want" can be a bit
>> fiddly
> As I understand, setting the cursor property allows me to put the
> cursor only in one position inside my overlay.

AFAIK the cursor is never at two places at the same time, so that's not
a problem.

> I want the user to be able to move the cursor inside the overlay when
> using the after-string property.

You can, by changing the `cursor` property whenever you want the cursor
to change position.

>> so I think it's worth clarifying why exactly you want something
>> like that, so as to be better decide how to attack the problem.
> Im trying to implement something visually similar to what vimdiff has,
> as in this URL:
> https://www.thegeekstuff.com/2010/06/vimdiff-file-diff-tool/
> In there, you can see the lines filled with "....................."
> where there is no content in the line of the first file and there is
> content in the matching line in the second file.
> Hope this makes it clearer and that I managed to reply this thread correctly.

That doesn't explain why you care about the cursor positioning in those
spaces that don't correspond to any real line, so I'm afraid it doesn't
make it clearer :-(


        Stefan




reply via email to

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