summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohann Klähn <kljohann@gmail.com>2009-06-25 13:47:34 +0200
committerJohann Klähn <kljohann@gmail.com>2009-06-29 16:41:33 +0200
commit3b1898f3e809ec00f807da6108c130d003161e38 (patch)
treeb0d7b313d0dd2105ba3ba1ac19df34f7cddafa62
parent4621f1117ee0a2cd4848531727ef249e98c80835 (diff)
downloadfork-ledger-3b1898f3e809ec00f807da6108c130d003161e38.tar.gz
fork-ledger-3b1898f3e809ec00f807da6108c130d003161e38.tar.bz2
fork-ledger-3b1898f3e809ec00f807da6108c130d003161e38.zip
vim: add current text to completion
-rw-r--r--contrib/vim/ftplugin/ledger.vim5
1 files changed, 3 insertions, 2 deletions
diff --git a/contrib/vim/ftplugin/ledger.vim b/contrib/vim/ftplugin/ledger.vim
index d74e900f..c965c153 100644
--- a/contrib/vim/ftplugin/ledger.vim
+++ b/contrib/vim/ftplugin/ledger.vim
@@ -127,8 +127,9 @@ function! LedgerComplete(findstart, base)
call add(hierarchy, '')
endif
- let results = []
- return reverse(LedgerFindInTree(LedgerGetAccountHierarchy(), hierarchy))
+ let results = LedgerFindInTree(LedgerGetAccountHierarchy(), hierarchy)
+ call add(results, a:base)
+ return reverse(results)
else
unlet! b:compl_context
return []