zhaogaolong / vim

Automatically exported from code.google.com/p/vim
0 stars 0 forks source link

Adding a setting doesn't check for existing trailing comma #365

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. vim -u NONE -U NONE
2. :set wildignore=*.png,
3. :set wildignore+=*jpg
4. :set wildignore?
outputs wildignore=*.png,,*jpg

- What is the expected output? What do you see instead?
wildignore=*.png,*jpg

- What version of the product are you using? On what operating system?
GVim 7.4 (2013 Aug 10, compiled that ) on Windows 7

- Please provide any additional information below.
having a broken wildignore breaks tags (I could make a ticket for this, if 
you'd like):

0. $ctags -R
1. vim -u NONE -U NONE
3. :set wildignore=*.png
4. :e a_file.py
5. :tag a_method "this works
6. :set wildignore=*.png,,*.jpg
7. :tag a_method "this throws a missing tags file error

Original issue reported on code.google.com by tankorsm...@gmail.com on 18 May 2015 at 6:40

GoogleCodeExporter commented 9 years ago
What is the reason, you are adding a trailing comma?

Original comment by chrisbr...@googlemail.com on 24 May 2015 at 7:08

GoogleCodeExporter commented 9 years ago
It was a typo originally. I spent a few hours trying to figure out why my tags 
file weren't being found and I traced it back to the python.vim adding to 
wildignore. 

I had ':set wildignore=type1, type2, type3,' in my vimrc and everything worked 
fine, but if I switched to a different directory and back, I'd lose my tags 
file, and nothing would get it back, despite the tags file being right there. 
The python.vim was doing ':set wildignore+=.pyc' or something, and that would 
result in `wildignore=type1, type2, type3,,pyc`, and that'd absolutely break  
tags support.

Original comment by tankorsm...@gmail.com on 24 May 2015 at 7:13

GoogleCodeExporter commented 9 years ago
Well, here is a patch, that should prevent that. 

Original comment by chrisbr...@googlemail.com on 24 May 2015 at 7:44

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks! I'll make a ticket for the tags breaking. 

Original comment by tankorsm...@gmail.com on 24 May 2015 at 7:47

GoogleCodeExporter commented 9 years ago
Fixed with patch 7.4.741

Original comment by brammool...@gmail.com on 19 Jun 2015 at 12:09

GoogleCodeExporter commented 9 years ago
Thanks guys.

Original comment by tankorsm...@gmail.com on 19 Jun 2015 at 12:32