zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: zsh-workers@zsh.org
Subject: Re: PATCH: Add an option to disable deactivating region hilighting whenever you edit something
Date: Fri, 07 Nov 2014 11:15:46 +0100	[thread overview]
Message-ID: <10571.1415355346@thecus.kiddle.eu> (raw)
In-Reply-To: <1415351070-22018-1-git-send-email-mikachu@gmail.com>

Mikael Magnusson wrote:
> 
> While we're on the topic of deactivating the region, I've had this
> patch lying around forever in my local tree, but never cared enough to
> send it. It just keeps the region on until the user disables it again, I
> use this very complicated widget:

I'm concerned that, as is often the case with options, it is a somewhat
blunt instrument. It isn't just edits that this affects. Most vi
commands too: I'd want the option set for vi command mode but not for
vi insert mode. That said, the use case you show is quite nice. The
region should be more flexible (and I have some stuff coming in this
area which I probably now need to start unloading).

Currently, the region is fixed to an emacs region model so
'region_active = 0' typically appears in shared code. We need control to
move up to individual widgets somewhat more.

I can think of a few ways this might be more versatile, setting a
flag on the zle widget so you might mark self-insert as being region
preserving might be one option. I've pondered adding this for completion
suffix removal too. We also have some prefix widgets such as for numeric
arguments which affect the behaviour of the following widget.

If we do go with the option, I'll have a think about the name.

Oliver


  reply	other threads:[~2014-11-07 10:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-06 23:48 PATCH: keep region active when widget fails Oliver Kiddle
2014-11-07  0:37 ` Bart Schaefer
2014-11-07  9:04 ` PATCH: Add an option to disable deactivating region hilighting whenever you edit something Mikael Magnusson
2014-11-07 10:15   ` Oliver Kiddle [this message]
2014-11-07 10:42     ` Mikael Magnusson
2014-11-07  9:36 ` PATCH: keep region active when widget fails Peter Stephenson

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=10571.1415355346@thecus.kiddle.eu \
    --to=okiddle@yahoo.co.uk \
    --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).