feat: complete task editing coverage (#109)
Problem: the task editing surface had gaps — category and recurrence had no keymaps, `:Pending edit` required knowing the task ID, tasks couldn't be reordered with a keymap, priority was binary (0/1), and `wip`/`blocked` states were documented but unimplemented. Solution: fill every cell so every property is editable in every way. - `gc`/`gr` keymaps for category select and recurrence prompt - cursor-aware `:Pending edit` (omit ID to use task under cursor) - `J`/`K` keymaps to reorder tasks within a category - multi-level priorities (`max_priority` config, `g!` cycles 0→1→2→3→0) - `+!!`/`+!!!` tokens in `:Pending edit`, `:Pending add`, `parse.body()` - `PendingPriority2`/`PendingPriority3` highlight groups - `gw`/`gb` keymaps toggle `wip`/`blocked` status - `>`/`=` state chars in buffer rendering and diff parsing - `PendingWip`/`PendingBlocked` highlight groups - sort order: wip → pending → blocked → done - `wip`/`blocked` filter predicates and icons
This commit is contained in:
parent
073541424e
commit
b06249f101
9 changed files with 498 additions and 101 deletions
|
|
@ -563,24 +563,34 @@ function M.body(text)
|
|||
metadata.cat = cat_val
|
||||
i = i - 1
|
||||
else
|
||||
local rec_val = token:match(rec_pattern)
|
||||
if rec_val then
|
||||
if metadata.rec then
|
||||
local pri_bangs = token:match('^%+(!+)$')
|
||||
if pri_bangs then
|
||||
if metadata.priority then
|
||||
break
|
||||
end
|
||||
local recur = require('pending.recur')
|
||||
local raw_spec = rec_val
|
||||
if raw_spec:sub(1, 1) == '!' then
|
||||
metadata.rec_mode = 'completion'
|
||||
raw_spec = raw_spec:sub(2)
|
||||
end
|
||||
if not recur.validate(raw_spec) then
|
||||
break
|
||||
end
|
||||
metadata.rec = raw_spec
|
||||
local max = config.get().max_priority or 3
|
||||
metadata.priority = math.min(#pri_bangs, max)
|
||||
i = i - 1
|
||||
else
|
||||
break
|
||||
local rec_val = token:match(rec_pattern)
|
||||
if rec_val then
|
||||
if metadata.rec then
|
||||
break
|
||||
end
|
||||
local recur = require('pending.recur')
|
||||
local raw_spec = rec_val
|
||||
if raw_spec:sub(1, 1) == '!' then
|
||||
metadata.rec_mode = 'completion'
|
||||
raw_spec = raw_spec:sub(2)
|
||||
end
|
||||
if not recur.validate(raw_spec) then
|
||||
break
|
||||
end
|
||||
metadata.rec = raw_spec
|
||||
i = i - 1
|
||||
else
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue