File: lbdbq-query.diff

package info (click to toggle)
vim-scripts 20130814
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 4,608 kB
  • ctags: 2,511
  • sloc: perl: 452; xml: 95; makefile: 25
file content (19 lines) | stat: -rw-r--r-- 616 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
## lbdbq-query.diff by James Vega <jamessan@debian.org>
##
## Ensure there are enough fields to build the results list.

Index: vim-scripts/plugin/lbdbq.vim
===================================================================
--- vim-scripts.orig/plugin/lbdbq.vim
+++ vim-scripts/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