From: Mikael Magnusson <mikachu@gmail.com>
To: zsh-workers@zsh.org
Subject: PATCH: Document narrow-to-region -l and -r.
Date: Mon, 22 Jun 2015 02:18:11 +0200 [thread overview]
Message-ID: <1434932291-23881-1-git-send-email-mikachu@gmail.com> (raw)
In-Reply-To: <CAHYJk3T3VmT3gAEkzpUJ=WPcqVDNWT8OCD9WqD=ddUFTbPigyA@mail.gmail.com>
---
Doc/Zsh/contrib.yo | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/Doc/Zsh/contrib.yo b/Doc/Zsh/contrib.yo
index 323bf0f..09ac5c8 100644
--- a/Doc/Zsh/contrib.yo
+++ b/Doc/Zsh/contrib.yo
@@ -2272,7 +2272,8 @@ tindex(narrow-to-region)
tindex(narrow-to-region-invisible)
redef(SPACES)(0)(tt(ifztexi(NOTRANS(@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ))ifnztexi( )))
xitem(tt(narrow-to-region )[ tt(-p) var(pre) ] [ tt(-P) var(post) ])
-xitem(SPACES()[ tt(-S) var(statepm) | tt(-R) var(statepm) ] [ tt(-n) ] [ var(start) var(end) ])
+xitem(SPACES()[ tt(-S) var(statepm) | tt(-R) var(statepm) | [ tt(-l) var(lbufvar) ] [ tt(-r) var(rbufvar) ] ])
+xitem(SPACES()[ tt(-n) ] [ var(start) var(end) ])
item(tt(narrow-to-region-invisible))(
Narrow the editable portion of the buffer to the region between the cursor
and the mark, which may be in either order. The region may not be empty.
@@ -2308,9 +2309,15 @@ parameter, except that parameters beginning with the prefix tt(_ntr_) are
reserved for use within tt(narrow-to-region). Typically the parameter will
be local to the calling function.
+The options tt(-l) var(lbufvar) and tt(-r) var(rbufvar) may be used to
+specify parameters where the widget will store the resulting text from
+the operation. The parameter var(lbufvar) will contain var(LBUFFER)
+and var(rbufvar) will contain var(RBUFFER). Neither of these two options
+may be used with tt(-S) or tt(-R).
+
tt(narrow-to-region-invisible) is a simple widget which calls
tt(narrow-to-region) with arguments which replace any text outside the
-region with `tt(...)'.
+region with `tt(...)'. It does not take any arguments.
The display is restored (and the widget returns) upon any zle command
which would usually cause the line to be accepted or aborted. Hence an
--
2.4.0
next prev parent reply other threads:[~2015-06-22 0:18 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-20 9:16 This widget implementation feels a bit clunky (edit-quoted-word) Mikael Magnusson
2015-06-20 17:06 ` Peter Stephenson
2015-06-21 7:09 ` Mikael Magnusson
2015-06-21 17:17 ` Peter Stephenson
2015-06-22 2:26 ` Mikael Magnusson
2015-06-22 0:18 ` Mikael Magnusson [this message]
2015-06-20 17:21 ` Bart Schaefer
2015-07-18 23:42 ` PATCH: narrow-to-region (was Re: This widget implementation feels a bit clunky) Bart Schaefer
2015-07-19 3:55 ` Oliver Kiddle
2015-07-19 8:23 ` Bart Schaefer
2015-07-20 9:19 ` Oliver Kiddle
2015-07-20 16:29 ` Bart Schaefer
2015-07-23 5:41 ` Undo and narrow-to-region (was Re: PATCH: narrow-to-region (was ...)) Bart Schaefer
2015-07-27 15:44 ` Oliver Kiddle
2015-08-12 17:00 ` PATCH: Re: Undo and narrow-to-region (was ...) Oliver Kiddle
2015-08-17 21:15 ` Daniel Hahler
2015-08-17 21:58 ` Bart Schaefer
2015-08-18 3:43 ` Bart Schaefer
2015-08-18 7:05 ` Bart Schaefer
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=1434932291-23881-1-git-send-email-mikachu@gmail.com \
--to=mikachu@gmail.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).