diff options
Diffstat (limited to 'runtime/doc/eval.txt')
-rw-r--r-- | runtime/doc/eval.txt | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 3303cab3a..72a66d548 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 8.2. Last change: 2020 Nov 04 +*eval.txt* For Vim version 8.2. Last change: 2020 Nov 11 VIM REFERENCE MANUAL by Bram Moolenaar @@ -3473,8 +3473,8 @@ byteidx({expr}, {nr}) *byteidx()* Return byte index of the {nr}'th character in the string {expr}. Use zero for the first character, it then returns zero. - This function is only useful when there are multibyte - characters, otherwise the returned value is equal to {nr}. + If there are no multibyte characters the returned value is + equal to {nr}. Composing characters are not counted separately, their byte length is added to the preceding base character. See |byteidxcomp()| below for counting composing characters @@ -7433,7 +7433,9 @@ matchfuzzy({list}, {str} [, {dict}]) *matchfuzzy()* matchfuzzypos({list}, {str} [, {dict}]) *matchfuzzypos()* Same as |matchfuzzy()|, but returns the list of matched strings and the list of character positions where characters - in {str} matches. + in {str} matches. You can use |byteidx()|to convert a + character position to a byte position. + If {str} matches multiple times in a string, then only the positions for the best match is returned. @@ -8728,11 +8730,16 @@ search({pattern} [, {flags} [, {stopline} [, {timeout} [, {skip}]]]]) 'ignorecase', 'smartcase' and 'magic' are used. - When the 'z' flag is not given, searching always starts in - column zero and then matches before the cursor are skipped. - When the 'c' flag is present in 'cpo' the next search starts - after the match. Without the 'c' flag the next search starts - one column further. + When the 'z' flag is not given, forward searching always + starts in column zero and then matches before the cursor are + skipped. When the 'c' flag is present in 'cpo' the next + search starts after the match. Without the 'c' flag the next + search starts one column further. This matters for + overlapping matches. + When searching backwards and the 'z' flag is given then the + search starts in column zero, thus no match in the current + line will be found (unless wrapping around the end of the + file). When the {stopline} argument is given then the search stops after searching this line. This is useful to restrict the |