zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: buggy paste highlight with backward-extend-paste
Date: Wed, 9 Dec 2015 13:46:49 -0800	[thread overview]
Message-ID: <151209134649.ZM28323@torch.brasslantern.com> (raw)
In-Reply-To: <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@vinc17.net> 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
of it.

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.


  reply	other threads:[~2015-12-09 21:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-09  2:16 Vincent Lefevre
2015-12-09  5:30 ` Bart Schaefer
2015-12-09  9:13   ` Vincent Lefevre
2015-12-09 21:46     ` Bart Schaefer [this message]
2015-12-11 10:29       ` Vincent Lefevre

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=151209134649.ZM28323@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).