-*usr_41.txt* For Vim version 7.0aa. Last change: 2005 Feb 23
+*usr_41.txt* For Vim version 7.0aa. Last change: 2005 Mar 15
VIM USER MANUAL - by Bram Moolenaar
getreg() get contents of a register
getregtype() get type of a register
setreg() set contents and type of a register
+ taglist() get list of matching tags
==============================================================================
*41.7* Defining a function
add_tag_field(dict, field_name, start, end)
dict_T *dict;
char *field_name;
- char_u *start;
- char_u *end;
+ char_u *start; /* start of the value */
+ char_u *end; /* after the value; can be NULL */
{
char_u buf[MAXPATHL];
int len = 0;
if (start != NULL)
{
+ if (end == NULL)
+ {
+ end = start + STRLEN(start);
+ while (end > start && (end[-1] == '\r' || end[-1] == '\n'))
+ --end;
+ }
len = end - start;
if (len > sizeof(buf) - 1)
len = sizeof(buf) - 1;