zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: State of the ZLE region across new prompts
Date: Mon, 11 Jul 2016 21:28:14 -0700	[thread overview]
Message-ID: <160711212814.ZM15416@torch.brasslantern.com> (raw)

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?

Aside:  The documentation for the zle_highlight "region" context
discusses "calling set-mark-command with a negative numeric argument"
and "exchange-point-and-mark with a zero numeric argument" but does
not mention deactivate-region or assignments to REGION_ACTIVE.


             reply	other threads:[~2016-07-12  4:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-12  4:28 Bart Schaefer [this message]
2016-07-12  8:28 ` Peter Stephenson
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=160711212814.ZM15416@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).