pending.nvim/lua/pending
Barrett Ruth fe6d7964d4 fix(init): preserve cursor column and position in mutation functions
Problem: `toggle_complete()`, `toggle_priority()`, `adjust_priority()`,
`toggle_status()`, and `move_task()` captured only the row from
`nvim_win_get_cursor` and restored the cursor to column 0 after
re-render. Additionally, `toggle_complete()` followed the toggled task
to its new sorted position at the bottom of the category, which is
disorienting when working through a list of tasks.

Solution: Capture both row and column from the cursor, and restore the
column in all five functions. For `toggle_complete()`, instead of
chasing the task ID after render, clamp the cursor to the original row
(or total lines if shorter) and advance to the nearest task line,
similar to the `]t` motion in `textobj.lua`.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 20:08:07 -04:00
..
sync refactor: tighten LuaCATS annotations and canonicalize metadata fields (#141) 2026-03-11 12:55:36 -04:00
buffer.lua fix(forge): fix ghost extmarks, false auth warnings, and needless API calls (#136) 2026-03-10 23:28:52 -04:00
complete.lua refactor: tighten LuaCATS annotations and canonicalize metadata fields (#141) 2026-03-11 12:55:36 -04:00
config.lua refactor: tighten LuaCATS annotations and canonicalize metadata fields (#141) 2026-03-11 12:55:36 -04:00
diff.lua fix(parse): skip forge refs in right-to-left metadata scan (#142) 2026-03-11 13:02:55 -04:00
forge.lua refactor: tighten LuaCATS annotations and canonicalize metadata fields (#141) 2026-03-11 12:55:36 -04:00
health.lua refactor(forge): simplify auth gating (#139) 2026-03-11 12:28:22 -04:00
init.lua fix(init): preserve cursor column and position in mutation functions 2026-03-12 20:08:07 -04:00
log.lua fix(diff): preserve due/rec when absent from buffer line (#68) 2026-03-05 12:46:54 -05:00
parse.lua fix(parse): skip forge refs in right-to-left metadata scan (#142) 2026-03-11 13:02:55 -04:00
recur.lua refactor: tighten LuaCATS annotations and canonicalize metadata fields (#141) 2026-03-11 12:55:36 -04:00
store.lua refactor: tighten LuaCATS annotations and canonicalize metadata fields (#141) 2026-03-11 12:55:36 -04:00
textobj.lua fix(diff): preserve due/rec when absent from buffer line (#68) 2026-03-05 12:46:54 -05:00
views.lua refactor: tighten LuaCATS annotations and canonicalize metadata fields (#141) 2026-03-11 12:55:36 -04:00