Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: bracketed paste - chopping trailing newlines

On Sep 12,  2:17am, Mikael Magnusson wrote:
} I personally find it very surprising that pasting would interact with
} the region in any way at all, yanking normally doesn't.

Yes, I was a little surprised that Oliver implemented it that way, as
it doesn't seem to be what Emacs does (well, except possibly Aquamacs
on MacOS, which tries to emulate MacOS cmd-c/cmd-v behavior).

However, that adds yet another thing to the list of disagreements, so
I wasn't going to go there.

} > I guess I agree with Oliver about the newline stripping.
} We have at least two options that decide if and how we print a single
} newline before drawing the prompt, maybe there is room for some here
} as well.

Problems with that are (a) for newlines before the prompt, the initial
state is outside the editor, but with paste we're inside the editor
the whole time so any extra stuff we output (other than highlighting)
could be confused with $BUFFER contents; and (b) we're trying to move
away from having module-specific setopts in the main shell.

Using RPS1 with TRANSIENT_RPROMPT might cover a lot of this, as
the prompt would still be there if the line has not been accepted.
Unfortunately RPS1 stays on the first line and is transient based on
the legth of that first line.  It might be nicer if it acted more

Messages sorted by: Reverse Date, Date, Thread, Author