tomtom / quickfixsigns_vim

Mark quickfix & location list items with signs
http://www.vim.org/scripts/script.php?script_id=2584
GNU General Public License v3.0
131 stars 13 forks source link

errors with Fugitive #2

Closed rememberthemer closed 13 years ago

rememberthemer commented 13 years ago

Get a lot of non-fatal but annoying errors when using quickfixsigns together with fugitive.

E.g. :Gcommit opens a buffer (named 'index') for editing the commit message, which triggers

function! quickfixsigns#vcsdiff#GetList(filename) quickfixsigns#vcsdiff#GuessType() ## evaluates to 'git' ... let dir = fnamemodify(a:filename, ':h') #### evaluates to '.git' ... let dir0 = expand('%:p:h') #### evaluates to '.git' exec 'cd' fnameescape(dir) #### CRAP

i.e. buffer has no directory path (dir0), so lts of cdpath error messages ensue.

The 'quickfix' is to add the following:

    let dir0 = expand('%:p:h')
    if dir0 == '.git' 
        return []
    endif

PS thanks for the plugin. vv useful.

Adrian

tomtom commented 13 years ago

I added a check to retrieve a list only in normal buffers. Please let me know if this works. If it doesn't, I will blacklist the .git directory as proposed.

rememberthemer commented 13 years ago

All is now good.

Cheers Mr TomTom