Hi sinbad!

On So, 09 Okt 2011, sinbad wrote:

> On Oct 10, 10:19 am, sinbad <[email protected]> wrote:
> > As an example i am using vim 7.3 source code. I am listing all the
> > references
> > of the ResetRedobuff() function using Gtags plugin of "Gnu Global"
> > tool.
> >
> > Location List: the list is filled using the following Gtags command
> >
> > :Gtags -r ResetRedobuff
> > :lopen
> >
> > edit.c|404| ResetRedobuff();
> > edit.c|6436| ResetRedobuff();
> > misc2.c|1176| ResetRedobuff();
> > misc2.c|1177| ResetRedobuff();
> > normal.c|1506| ResetRedobuff();
> > normal.c|3626| ResetRedobuff();
> > normal.c|7380| ResetRedobuff();
> > spell.c|10317| ResetRedobuff();
> >
> > " Fill the variable 'x' with current location lsit details
> > :let x = getloclist(0)
> > :echo x
> >
> > [{'lnum': 404, 'bufnr': 1, 'col': 0, 'valid': 1, 'vcol': 0, 'nr': -1,
> > 'type': '', 'pattern': '', 'text': '              ResetRedobuff();'},
> > {'lnum': 6436, 'bufnr': 1, 'col': 0, 'valid': 1, 'vcol':
> > 0, 'nr': -1, 'type': '', 'pattern': '', 'text': '
> > ResetRedobuff();'}, {'lnum': 1176, 'bufnr': 3, 'col': 0, 'valid': 1,
> > 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': '
> >       ResetRedobuff();'}, {'lnum': 1177, 'bufnr': 3, 'col': 0,
> > 'valid': 1, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text':
> > '             ResetRedobuff();'}, {'lnum': 1506, 'bufnr': 4, 'col'
> > : 0, 'valid': 1, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '',
> > 'text': '                          ResetRedobuff();'}, {'lnum': 3626,
> > 'bufnr': 4, 'col': 0, 'valid': 1, 'vcol': 0, 'nr': -1, 'type':
> >  '', 'pattern': '', 'text': '            ResetRedobuff();'}, {'lnum':
> > 7380, 'bufnr': 4, 'col': 0, 'valid': 1, 'vcol': 0, 'nr': -1, 'type':
> > '', 'pattern': '', 'text': '             ResetRedobuff();'}, {'lnum': 
> > 10317, 'bufnr': 5, 'col': 0, 'valid': 1, 'vcol': 0, 'nr':
> >
> > -1, 'type': '', 'pattern': '', 'text': '
> > ResetRedobuff();'}]
> >
> > " set the location list with contents from 'x'
> > :call setloclist(0,x)
> >
> > :lopen
> > New Location List: observe that the filenames are missing, all the
> > following are dead links.
> >
> > |404| ResetRedobuff();
> > |6436| ResetRedobuff();
> > |1176| ResetRedobuff();
> > |1177| ResetRedobuff();
> > |1506| ResetRedobuff();
> > |3626| ResetRedobuff();
> > |7380| ResetRedobuff();
> > |10317| ResetRedobuff();
> >
> > :echo getloclist(0) " observe that 'valid' field is '0'
> >
> > [{'lnum': 404, 'bufnr': 0, 'col': 0, 'valid': 0, 'vcol': 0, 'nr': -1,
> > 'type': '', 'pattern': '', 'text': '              ResetRedobuff();'},
> > {'lnum': 6436, 'bufnr': 0, 'col': 0, 'valid': 0, 'vcol':
> > 0, 'nr': -1, 'type': '', 'pattern': '', 'text': '
> > ResetRedobuff();'}, {'lnum': 1176, 'bufnr': 0, 'col': 0, 'valid': 0,
> > 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': '
> >       ResetRedobuff();'}, {'lnum': 1177, 'bufnr': 0, 'col': 0,
> > 'valid': 0, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text':
> > '             ResetRedobuff();'}, {'lnum': 1506, 'bufnr': 0, 'col'
> > : 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '',
> > 'text': '                          ResetRedobuff();'}, {'lnum': 3626,
> > 'bufnr': 0, 'col': 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'type':
> >  '', 'pattern': '', 'text': '            ResetRedobuff();'}, {'lnum':
> > 7380, 'bufnr': 0, 'col': 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'type':
> > '', 'pattern': '', 'text': '             ResetRedobuff();'}, {'lnum': 
> > 10317, 'bufnr': 0, 'col': 0, 'valid': 0, 'vcol': 0, 'nr':
> >
> > -1, 'type': '', 'pattern': '', 'text': '
> > ResetRedobuff();'}]

Thanks for the detailed steps. Next time, please attach the plugin, so I 
don't have to fix all the linebreaks ;)

Unfortunately, I can't reproduce the error. I even tried with a stock 
7.3 vim version. Anyway, I noticed, that all your bufnr are always zero. 
I think that definitely shouldn't be. I guess, somehow all your buffers 
get wiped out. Check with :ls! if there are other buffers available. And 
can you please try this also when starting vim this way:
vim -u NONE -U NONE -N -i NONE
then do :so ~/.vim/plugin/gtags.vim
and proceed as above.

regards,
Christian

-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to