Zsh Mailing List Archive
Messages sorted by:
Re: bracketed paste - chopping trailing newlines
Bart Schaefer wrote on Fri, Sep 11, 2015 at 16:07:02 -0700:
> On Sep 10, 7:11pm, Daniel Shahaf wrote:
> } Yes, I also feel I'm repeating myself. I've already made my case a few
> } times. I've also suggested fixes and implemented them. I have been
> } trying to reach consensus, but so far haven't succeeded. As you can
> } imagine, by now I'm rather frustrated.
> This may be a situation where it's not possible to get consensus. We
> have I think three different approaches (Oliver's, Carsten's, yours)
> none of the three agrees with either of the others, and we haven't
> tried conducting any sort of poll.
I've spoken privately with both Oliver and Carsten and I actually think
there _is_ consensus for both patches that I committed (strip newlines
and enable highlighting). It's the "strip newlines at accept-line" part
that's not in consensus.
As to interaction with the region: in my workflow, I sometimes do
<set-mark-command>, <typing>, <quote-region>. During that sequence,
even I happen to do a paste during the <typing> part, I wouldn't want
MARK to move to the start of the paste. I don't know <paste> should
default to moving MARK.
> } 1. Don't strip newlines at paste
> } 2. Highlight pastes
> } 3. Strip newlines at accept-line that immediately follows a paste
> } I think all objections to (2) have been addressed, apart from the
> } question of whether to use standout or underline. I think standout is
> } easier to spot and doesn't clash with zle_highlight[region]'s default
> I'm of two minds here. One, there is a relationship between paste and
> the region -- if the region is active, the paste replaces it. However,
> if there is no active region, the paste does not make it active (even
> though it sets MARK/CURSOR to the opposite ends and e.g. kill-region
> will kill the pasted text). So two, making the paste look the same as
> an active region may be misleading ... or, maybe it's OK because it's
> almost the same thing.
> I guess I agree with Oliver about the newline stripping.
Messages sorted by: