[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: virtual space?
From: |
Michael Durland |
Subject: |
Re: virtual space? |
Date: |
Wed, 22 Oct 2003 01:33:05 GMT |
"Stefan Monnier" <monnier@iro.umontreal.ca> wrote in message
jwv65ii8wwd.fsf-monnier+gnu.emacs.help@vor.iro.umontreal.ca">news:jwv65ii8wwd.fsf-monnier+gnu.emacs.help@vor.iro.umontreal.ca...
> > Having a virtual cursor would solve the problem.
>
>
> Neither is it for me. At first, it would seem like it'd be very difficult
> to implement, but now that I think about it, I believe it can be done
purely
> in elisp: When going "past the last char" of a line, just add an overlay
at
> the end of the line with an `after-string' property of " ". At least
> here (Emacs-CVS), it seems to move the cursor according to the number of
> spaces you've put, so you can place the cursor where you want on screen
> without modifying the buffer text. The tricky part will be to make the
> other commands work correctly by replacing the overlay with actual spaces
> before doing an insertion.
>
This sounds cool! So is it possible to implement a virtual cursor entirely
as an overlay? I'm imagining that the real cursor would have to be hidden,
but always follow the virtual cursor where there is text. Where there isn't
text, the virtual cursor would travel away from the real cursor. Then when
the virtual cursor got back on to real text, they would sync up again. If
text was inserted at the virtual cursor, yes whitespace would need to be
added to pad the real cursor out to the virtual cursor, but this is
expected. I know a little about overlays, but not enough to write one from
scratch. I'm learning. Any guidance down this path would be appreciated.
Thanks,
Mike
- virtual space?, Michael Durland, 2003/10/19
- Re: virtual space?, Sudarshan S. Chawathe, 2003/10/19
- Re: virtual space?, Michael Durland, 2003/10/19
- Re: virtual space?, Björn Lindström, 2003/10/20
- Re: virtual space?, Michael Durland, 2003/10/20
- Re: virtual space?, Dan Anderson, 2003/10/21
- Re: virtual space?, Eli Zaretskii, 2003/10/21
- Re: virtual space?, Barman Brakjoller, 2003/10/21
- Re: virtual space?, Stefan Monnier, 2003/10/21
- Re: virtual space?,
Michael Durland <=
- Message not available
- Re: virtual space?, Michael Durland, 2003/10/21
- Re: virtual space?, Eli Zaretskii, 2003/10/22
- Message not available
- Re: virtual space?, Kevin Rodgers, 2003/10/22
- Re: virtual space?, Eli Zaretskii, 2003/10/22
- Message not available
- Re: virtual space?, Stefan Monnier, 2003/10/22