Mercurial > vim
diff src/tag.c @ 11329:c7ba89661c39 v8.0.0550
patch 8.0.0550: cannot parse some etags format tags file
commit https://github.com/vim/vim/commit/9585a1655ba0d34ea88574617112093a9bd4f2e9
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Apr 7 20:30:29 2017 +0200
patch 8.0.0550: cannot parse some etags format tags file
Problem: Some etags format tags file use 0x01, breaking the parsing.
Solution: Use 0x02 for TAG_SEP. (James McCoy, closes https://github.com/vim/vim/issues/1614)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 07 Apr 2017 20:45:04 +0200 |
parents | 5b524c2286ce |
children | c45fb081391c |
line wrap: on
line diff
--- a/src/tag.c +++ b/src/tag.c @@ -2355,18 +2355,19 @@ parse_line: } else { -#define TAG_SEP 0x01 +#define TAG_SEP 0x02 size_t tag_fname_len = STRLEN(tag_fname); #ifdef FEAT_EMACS_TAGS size_t ebuf_len = 0; #endif /* Save the tag in a buffer. - * Use 0x01 to separate fields (Can't use NUL, because the - * hash key is terminated by NUL). - * Emacs tag: <mtt><tag_fname><0x01><ebuf><0x01><lbuf><NUL> - * other tag: <mtt><tag_fname><0x01><0x01><lbuf><NUL> - * without Emacs tags: <mtt><tag_fname><0x01><lbuf><NUL> + * Use 0x02 to separate fields (Can't use NUL because the + * hash key is terminated by NUL, or Ctrl_A because that is + * part of some Emacs tag files -- see parse_tag_line). + * Emacs tag: <mtt><tag_fname><0x02><ebuf><0x02><lbuf><NUL> + * other tag: <mtt><tag_fname><0x02><0x02><lbuf><NUL> + * without Emacs tags: <mtt><tag_fname><0x02><lbuf><NUL> * Here <mtt> is the "mtt" value plus 1 to avoid NUL. */ len = (int)tag_fname_len + (int)STRLEN(lbuf) + 3;