zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.stephenson@samsung.com>
To: zsh-workers@zsh.org
Subject: Re: State of the ZLE region across new prompts
Date: Tue, 12 Jul 2016 09:28:16 +0100	[thread overview]
Message-ID: <20160712092816.6abe0c53@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <160711212814.ZM15416@torch.brasslantern.com>

On Mon, 11 Jul 2016 21:28:14 -0700
Bart Schaefer <schaefer@brasslantern.com> wrote:
> Consider:
> 
>     zle-line-finish() { CURSOR=0 MARK=$#BUFFER REGION_ACTIVE=1 }
>     zle -N zle-line-finish
> 
> The idea here, such as it is, is to highlight the entire buffer before
> it is executed.  (I was doing this to test something unrelated.)
> 
> With this in place, run a command, then when ZLE resumes at the next
> prompt, start recalling commands with up-line-or-history.  Note that
> they are highlighted.  I'm not entirely sure but I believe this means
> the region is still active, not just that highlighting is confused.
> Is REGION_ACTIVE intended to persist in this way?

I think the problem is that region_active is set to 0 at the end of
zlecore(), so you're missing it when zle-line-finish is called.  This is
therefore an edge case.

It's presumably reasonable also to set it to 0 on any entry to the
top-level of ZLE at the start of zleread(). 

pws


  reply	other threads:[~2016-07-12  8:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-12  4:28 Bart Schaefer
2016-07-12  8:28 ` Peter Stephenson [this message]
2016-07-13 10:13 ` Oliver Kiddle
2016-07-13 16:38   ` Bart Schaefer
2016-07-13 17:01     ` 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=20160712092816.6abe0c53@pwslap01u.europe.root.pri \
    --to=p.stephenson@samsung.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).