summaryrefslogtreecommitdiff
path: root/nvim
diff options
context:
space:
mode:
Diffstat (limited to 'nvim')
-rw-r--r--nvim/nvim/lua/ledger.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/nvim/nvim/lua/ledger.lua b/nvim/nvim/lua/ledger.lua
index a6a5cd4..8baa221 100644
--- a/nvim/nvim/lua/ledger.lua
+++ b/nvim/nvim/lua/ledger.lua
@@ -12,9 +12,9 @@ function complete (arglead, cmdline, cursorpos)
local found = {}
for _,v in pairs(vim.api.nvim_buf_get_lines(0, 0, -1, false)) do
- _, _, account = string.find(v, account_pattern)
+ account = string.match(v, account_pattern)
if not account then
- _, _, account = string.find(v, entry_pattern)
+ account = string.match(v, entry_pattern)
end
if account and string.sub(account, 1, #arglead) == arglead then
if not found[account] then