## lbdbq-query.diff by James Vega <jamessan@debian.org>
##
## Ensure there are enough fields to build the results list.

Index: vim-scripts/lbdbq/plugin/lbdbq.vim
===================================================================
--- vim-scripts.orig/lbdbq/plugin/lbdbq.vim
+++ vim-scripts/lbdbq/plugin/lbdbq.vim
@@ -18,7 +18,9 @@
   let results = []
   for line in split(output, "\n")[1:] " skip first line (lbdbq summary)
     let fields = split(line, "\t")
-    let results += [ [fields[1], fields[0]] ]
+    if len(fields) >= 2
+      let results += [ [fields[1], fields[0]] ]
+    endif
   endfor
   return results
 endfunction
