Repository navigation
fix(nvim): keep prompt cursor at current input end - #810
dmtrKovalenko merged 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe picker now positions the cursor at the end of the actual input-buffer line for prefilled queries. ChangesPrefilled query cursor
Estimated code review effort: 1 (Trivial) | ~3 minutes Merge Risk: ⚪ Minimal · up to This localized change keeps the prompt cursor aligned with the current input while typing; no actionable merge-blocking risk remains beyond normal review and checks. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Upstream (9 commits): nvim telescope-style input mappings (dmtrKovalenko#814), clear_query action (dmtrKovalenko#812), FFFOpen/FFFClose autocmds (dmtrKovalenko#813), prompt cursor fix (dmtrKovalenko#810); pi-fff mute $HOME scan warning (dmtrKovalenko#806); fff-core clippy 1.98 (dmtrKovalenko#808); README sponsors + vimdoc regen. Clean auto-merge, no conflicts; only a 3-line behavior-neutral clippy fix touches Rust.
Problem
When typing immediately after opening the picker, the prompt cursor could move behind the first character. For example, typing
filescould produceilesf.The picker scheduled cursor positioning with
vim.schedule(), but calculated the position using the query captured when the picker opened:#config.prompt + #queryBecause the callback runs later, query could be outdated by the time it executed.
Fix
Read the current prompt line inside the scheduled callback
Summary by CodeRabbit