aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/tag.c
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2017-04-07 16:18:25 -0400
committerJames McCoy <jamessan@jamessan.com>2017-04-07 16:32:22 -0400
commit98dd9b801281bb6eb82817ba92c4f635bb5f45e0 (patch)
tree2708101e787ee508f484e53cf8c3be85e0a1841e /src/nvim/tag.c
parent20dc04470e00a369d2ba917a22b06ef2d173953f (diff)
downloadrneovim-98dd9b801281bb6eb82817ba92c4f635bb5f45e0.tar.gz
rneovim-98dd9b801281bb6eb82817ba92c4f635bb5f45e0.tar.bz2
rneovim-98dd9b801281bb6eb82817ba92c4f635bb5f45e0.zip
vim-patch:8.0.0550
Problem: Some etags format tags file use 0x01, breaking the parsing. Solution: Use 0x02 for TAG_SEP. (James McCoy, closes vim/vim#1614) https://github.com/vim/vim/commit/9585a1655ba0d34ea88574617112093a9bd4f2e9
Diffstat (limited to 'src/nvim/tag.c')
-rw-r--r--src/nvim/tag.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/tag.c b/src/nvim/tag.c
index e4ff829807..f01b8b8ab1 100644
--- a/src/nvim/tag.c
+++ b/src/nvim/tag.c
@@ -1847,14 +1847,14 @@ parse_line:
}
}
} else {
-#define TAG_SEP 0x01
+#define TAG_SEP 0x02
size_t tag_fname_len = STRLEN(tag_fname);
// Save the tag in a buffer.
- // Use 0x01 to separate fields (Can't use NUL, because the
+ // Use 0x02 to separate fields (Can't use NUL, because the
// hash key is terminated by NUL).
- // Emacs tag: <mtt><tag_fname><NUL><ebuf><NUL><lbuf>
- // other tag: <mtt><tag_fname><NUL><NUL><lbuf>
- // without Emacs tags: <mtt><tag_fname><NUL><lbuf>
+ // 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;
mfp = xmalloc(sizeof(char_u) + len + 1);