Files
nuwiki/lua/nuwiki
gffranco 695702555f
CI / cargo fmt --check (push) Successful in 20s
CI / cargo clippy (push) Successful in 1m5s
CI / cargo test (push) Successful in 1m19s
CI / editor keymaps (push) Successful in 1m57s
fix(tables/lua): switch smart_tab/return to <Cmd>, drop vim.schedule
The keymap harness caught a regression in 5b6f789: returning '' from
the <expr> mapping and deferring cursor placement to vim.schedule
breaks any keypress immediately following Tab/<CR>. nvim_feedkeys with
the 'x' flag drains all queued keys synchronously, so the user's next
key lands at the pre-jump cursor position — and the scheduled
callback's startinsert leaks insert mode into the next test.

Mirror what the VimL side already does: have <expr> return
"<Cmd>lua require('nuwiki.commands')._helper(args)<CR>" so the
align + cursor-jump runs synchronously inside the same keypress. No
schedule, no mode juggling.

  cr.adds_new_table_row              ✓
  tab.next_cell_in_table             ✓
  tab.from_first_cell_moves_to_second ✓
  shift_tab.prev_cell_in_table       ✓

39/39 in scripts/test-keymaps.sh (was 35/4-fail).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 01:39:05 +00:00
..
2026-05-11 21:57:05 +00:00