zsh-workers
 help / color / mirror / code / Atom feed
* State of the ZLE region across new prompts
@ 2016-07-12  4:28 Bart Schaefer
  2016-07-12  8:28 ` Peter Stephenson
  2016-07-13 10:13 ` Oliver Kiddle
  0 siblings, 2 replies; 5+ messages in thread
From: Bart Schaefer @ 2016-07-12  4:28 UTC (permalink / raw)
  To: zsh-workers

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.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-07-13 17:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-12  4:28 State of the ZLE region across new prompts Bart Schaefer
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

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).