Skip to content

fix: make context picker toggle immediate - #60

Merged
timothyckl merged 3 commits into
mainfrom
fix/context-picker-render-lag
May 1, 2026
Merged

fix: make context picker toggle immediate#60
timothyckl merged 3 commits into
mainfrom
fix/context-picker-render-lag

Conversation

@timothyckl

@timothyckl timothyckl commented May 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • Make the context picker mapping use nowait so toggles are not delayed by leader-key timeout handling
  • Avoid full picker re-renders on toggle by updating only the selected row
  • Cache relative display paths and selected counts to reduce per-toggle work

Test plan

  • Run nvim --headless +'lua dofile("lua/tau/context_picker.lua")' +qa
  • Manually verify toggles immediately in the context picker

timothyckl added 3 commits May 1, 2026 11:45
…ender vimscript calls

vim.fn.fnamemodify was called once per candidate file on every render,
crossing the Lua/Vimscript boundary N times per spacebar press. Cache
rel paths at picker open time alongside abs paths so render is pure Lua.

@timothyckl timothyckl left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome

@timothyckl
timothyckl merged commit c6404a0 into main May 1, 2026
1 check passed
@timothyckl
timothyckl deleted the fix/context-picker-render-lag branch May 1, 2026 05:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant