Subject: State of the ZLE region across new prompts
From: Bart Schaefer <[email-masked]>
To: [email-masked]
Date: Mon, 11 Jul 2016 21:28:14 -0700
List-Id: Zsh Workers List <zsh-workers.zsh.org>

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.