tomtom/quickfixsigns_vim — Issue #16: Invalid lnum when using Fugitive Glog command
Author: mutewinter
Created: 2012-02-01 13:32:38+00:00
State: open

When using [Fugitive](https://github.com/tpope/vim-fugitive) in conjunction with quickfixsigns I'm seeing the following error print out for every line in the file when running `:Glog`

```
Quickfixsigns PlaceSign: Invalid lnum: {'lnum': 0, 'bufnr': 2, 'col': 0, 'valid': 1, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': 'Commit message here.'}
```

@rmunn tracked down the error and [reported it](https://github.com/mutewinter/dot_vim/issues/3) on my [dot_vim](https://github.com/mutewinter/dot_vim) repository. Here's what he said could fix the problem:

> Possible fixes might involve patching quickfixsigns not to complain when lnum = 0 -- the following patch to quickfixsigns seems to work:

```
diff --git a/plugin/quickfixsigns.vim b/plugin/quickfixsigns.vim
index 9215b34..79f384e 100755
--- a/plugin/quickfixsigns.vim
+++ b/plugin/quickfixsigns.vim
@@ -614,9 +614,9 @@ function! s:PlaceSign(class, sign, list) "{{{3
endif
endif
else
- echohl WarningMsg
- echom "Quickfixsigns PlaceSign: Invalid lnum:" string(item)
- echohl NONE
+ "echohl WarningMsg
+ "echom "Quickfixsigns PlaceSign: Invalid lnum:" string(item)
+ "echohl NONE
endif
endfor
finally
```