Zsh Mailing List Archive
Messages sorted by:
Re: buggy paste highlight with backward-extend-paste
- X-seq: zsh-workers 37367
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: buggy paste highlight with backward-extend-paste
- Date: Wed, 9 Dec 2015 13:46:49 -0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version:content-type; bh=SvJTqsaO2Yo1eqpfMxXg/Tt5MEQdLhY9kuv5rwC2n+Q=; b=jQU5zi98lwNxxtjhcutD0BSxHDtCqFCADFIaN9p3S0kQbvPGVUbF8SNx6LNdzPGchI P/3b/yhqCeWZci1S74RAsrmz/23QbONtgCzDvOTBpXPIktcmzKdwIeapyuKpftbet+8Y TNKxAZZ8VEf+JTf7FQN2srU/mx2S0IGypdkHInskALi6zNRhh6SuxaQNkcZLjOYapJVL VKPneDxSR94ComTUNTCu5ULP0w1aIu/m3IIGxeJNSecL7yvwCr6ABP85hjt1A3Qr0K9w vLBlziGU3Sg2fj50kIV9WPSg0/uV8ahiuBxrROyJDUZ1YAZCudE5Bhm3IxL79QlnhQlo VcAg==
- In-reply-to: <20151209091357.GA15654@zira.vinc17.org>
- List-help: <mailto:email@example.com>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:firstname.lastname@example.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20151209021629.GA26831@zira.vinc17.org> <CAH+w=7YXVrmj5=tRm1V1XxH8B4T_DZ-gfKY7s0d3zzQwHPe-Tg@mail.gmail.com> <20151209091357.GA15654@zira.vinc17.org>
On Dec 9, 10:13am, Vincent Lefevre wrote:
} Subject: Re: buggy paste highlight with backward-extend-paste
} > On Tue, Dec 8, 2015 at 6:16 PM, Vincent Lefevre <vincent@xxxxxxxxxx> wrote:
} > >
} > > zstyle :bracketed-paste-magic paste-init backward-extend-paste
} But I don't want to extend the paste backward!
So I gather, but I did name it that way for a reason. :-)
} Note that I have the zstyle above just to make the paste correct in
} the following case:
} # Helper/example paste-init for exposing a word prefix inside PASTED.
} # Useful with url-quote-magic if you have http://... on the line and
} # are pasting additional text on the end of the URL.
} But affected the highlight is not expected.
This is one reason that Mikael keeps pushing his simplified variant where
you have no choice but to paste the entire URL rather than just a suffix
To "fix up" the highlighting, you'd also need a paste-finish action to
coordinate with backward-extend-paste. E.g.:
- In backward-extend-paste, save $bep_words[-1] in a global variable.
- In the paste-finish function, compare that saved global to the
leftmost part of $PASTED, and if they match, delete it from $PASTED
and append it to $LBUFFER.
- Also in paste-finish, possibly fix up the position of MARK.
If you come up with something that works, I'd be happy to look at it.
Otherwise it may be a while before I make an attempt.
Messages sorted by: