Hi,
2015/6/26 Fri 7:29:52 UTC+9 h_east wrote:
> Thanks for include my patch!
>
> But part of runtime/doc/eval.txt was missing.
> The following difference does not reflect.
>
> > *** 5792,5806 ****
> > Text after the number is silently ignored.
> >
> >
> > ! strchars({expr}) *strchars()*
> > The result is a Number, which is the number of characters
> > ! String {expr} occupies. Composing characters are counted
> > ! separately.
> > Also see |strlen()|, |strdisplaywidth()| and |strwidth()|.
> >
> > strdisplaywidth({expr}[, {col}]) *strdisplaywidth()*
> > The result is a Number, which is the number of display cells
> > ! String {expr} occupies on the screen.
> > When {col} is omitted zero is used. Otherwise it is the
> > screen column where to start. This matters for Tab
> > characters.
> > --- 5839,5855 ----
> > Text after the number is silently ignored.
> >
> >
> > ! strchars({expr} [, {skipcc}])
> > *strchars()*
> > The result is a Number, which is the number of characters
> > ! in String {expr}.
> > ! When {skipcc} is omitted or zero, composing characters are
> > ! counted separately.
> > ! When {skipcc} set to 1, Composing characters are ignored.
> > Also see |strlen()|, |strdisplaywidth()| and |strwidth()|.
> >
> > strdisplaywidth({expr}[, {col}]) *strdisplaywidth()*
> > The result is a Number, which is the number of display cells
> > ! String {expr} occupies on the screen when it starts a {col}.
> > When {col} is omitted zero is used. Otherwise it is the
> > screen column where to start. This matters for Tab
> > characters.
> > ***************
How about mentioning backward compatibilites of the {skipcc} parameter?
E.g.
strchars({expr} [, {skipcc}]) *strchars()*
The result is a Number, which is the number of characters
in String {expr}.
When {skipcc} is omitted or zero, composing characters are
counted separately.
When {skipcc} set to 1, Composing characters are ignored.
Also see |strlen()|, |strdisplaywidth()| and |strwidth()|.
{skipcc} is only available after 7.4.755. For backward
compatibility, you can define a wrapper function: >
if has("patch-7.4.755")
function s:strchars(str, skipcc)
return strchars(a:str, a:skipcc)
endfunction
else
function s:strchars(str, skipcc)
if a:skipcc
return strlen(substitute(a:str, ".", "x", "g"))
else
return strchars(a:str)
endif
endfunction
endif
<
Regards,
Ken Takata
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.