matchbufline() and the 'ignorecase' option value

7 views
Skip to first unread message

Yegappan Lakshmanan

unread,
Feb 22, 2024, 9:58:45 AMFeb 22
to vim_dev
Hi all,

The recently introduced matchbufline() and matchstrlist() functions
use the 'ignorecase' option value. If this option is set, then these
functions ignore the case when matching the strings.
So the behavior of a plugin using these functions depends on a user
configuration.
To ignore this option setting, the plugins need to either clear this
option or use the "\C" or "\c" atom
when calling this function.

Should we modify these functions to ignore the 'ignorecase' option
value? The plugins can
then choose to either ignore or not ignore the case explicitly and
will be independent of a
user configuration.

Note: These functions currently ignore the 'smartcase' option value.

Regards,
Yegappan

shane.qian

unread,
Feb 22, 2024, 10:56:13 AMFeb 22
to vim...@googlegroups.com
> The recently introduced matchbufline() and matchstrlist() functions
> use the 'ignorecase' option value. If this option is set, then these
> functions ignore the case when matching the strings.
> So the behavior of a plugin using these functions depends on a user
> configuration.
> To ignore this option setting, the plugins need to either clear this
> option or use the "\C" or "\c" atom
> when calling this function.
>
> Should we modify these functions to ignore the 'ignorecase' option
> value? The plugins can
> then choose to either ignore or not ignore the case explicitly and
> will be independent of a
> user configuration.

please keep it, since it is same behavior like 'matchstr()'

--
shane.xb.qian

Yegappan Lakshmanan

unread,
Feb 22, 2024, 1:16:07 PMFeb 22
to vim...@googlegroups.com
Hi,
Yes. It makes sense to keep the behavior of these new functions
consistent with the
existing match*() functions. I missed the note about 'ignorecase',
'smartcase' and
'magic' in the help for match(). I will add a link to this note in
the help text for the
matchbufline() and matchstrlist() functions.

Regards,
Yegappan
Reply all
Reply to author
Forward
0 new messages