summary refs log tree commit diff
path: root/Doc
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2016-07-28 09:50:03 +0100
committerPeter Stephenson <pws@zsh.org>2016-07-28 09:51:19 +0100
commit26361e438b41862f5495ae263bc004cfffbd6b44 (patch)
treeda473bbef1d6191dd73d5077e619e65388ffd9cb /Doc
parent895e9beb294a9e86c8ead01ff177624848f495ff (diff)
downloadzsh-26361e438b41862f5495ae263bc004cfffbd6b44.tar.gz
zsh-26361e438b41862f5495ae263bc004cfffbd6b44.tar.xz
zsh-26361e438b41862f5495ae263bc004cfffbd6b44.zip
38953: Fix some issues with match-words-by-style.
Add keyword retrieval of words.  Improve test for start of
word in subwords for use in delete-whole-word.  If line after
cursor is empty, white space is treated as ws-after-cursor.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/Zsh/contrib.yo11
1 files changed, 11 insertions, 0 deletions
diff --git a/Doc/Zsh/contrib.yo b/Doc/Zsh/contrib.yo
index c3dec34cd..8db7395d0 100644
--- a/Doc/Zsh/contrib.yo
+++ b/Doc/Zsh/contrib.yo
@@ -2132,6 +2132,17 @@ non-word characters following that word (7) the remainder of the line.  Any
 of the elements may be an empty string; the calling function should test
 for this to decide whether it can perform its function.
 
+If the variable tt(matched_words) is defined by the caller to
+tt(match-words-by-style) as an associative array (tt(local -A
+matched_words)), then the seven values given above should be retrieved
+from it as elements named tt(start), tt(word-before-cursor),
+tt(ws-before-cursor), tt(ws-after-cursor), tt(word-after-cursor),
+tt(ws-after-word), and tt(end).  In addition the element
+tt(is-word-start) is 1 if the cursor is on the start of a word or
+subword, or on white space before it (the cases can be distinguished by
+testing the tt(ws-after-cursor) element) and 0 otherwise.  This form is
+recommended for future compatibility.
+
 It is possible to pass options with arguments to tt(match-words-by-style)
 to override the use of styles.  The options are:
 startsitem()