Cursor position after paste

Tony Balinski ajbj at free.fr
Wed Nov 28 13:54:49 CET 2007


Quoting wwp <subscript at free.fr>:

> Hello there,
>
>
> I wonder, is there a way NOT to move the cursor position after a paste?
> I mean, when you paste something, the cursor moves to after the pasted
> block. I'd like to (optionally or not) keep the cursor at the position
> where I pasted, instead. Is it possible?

Well, the cursor can logically be either at the end or at the beginning
of the pasted block. You can do what you want with a macro, I suppose, eg

  s = get_selection("any")
  replace_range($cursor, $cursor, s)

which you can then bind to a keystroke. (It'll beep if there is no
selection around.) With some X resource jiggerypokery you could invoke
it from a mouse event too.

Tony


More information about the Discuss mailing list