From 260b128c3af345ea13410e31088be24ab165b4c1 Mon Sep 17 00:00:00 2001 From: Ekaitz Zarraga Date: Thu, 17 Jul 2025 22:31:48 +0200 Subject: fixup! nvim: Add support for ledger and timetracking --- nvim/nvim/lua/ledger.lua | 4 ++-- 1 file 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 -- cgit v1.2.3