Skip to content

feat: enhance cycle forward function#601

Draft
thuan1412 wants to merge 6 commits into
dmtrKovalenko:mainfrom
thuan1412:feat/enhance-cycle-forward-function
Draft

feat: enhance cycle forward function#601
thuan1412 wants to merge 6 commits into
dmtrKovalenko:mainfrom
thuan1412:feat/enhance-cycle-forward-function

Conversation

@thuan1412

@thuan1412 thuan1412 commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Will be ready after #438

This PR enhances the behavior of the cycle query forawd by:

  • if current offset is nil (new session), the forward will do nothing.
  • if current offset is nil (from resume function) or the offset is 0, then clear the input.

Before

before.mov

After

Screen.Recording.2026-06-14.at.21.25.08.mov

Add ability to resume the last closed picker with full state (query,
results, cursor, mode) by adapting for the refactored module structure.

In the coordinator (picker_ui.lua):
- save_state_and_close() deep-copies picker state before closing
- restore_from_state() recreates UI from saved snapshot
- M.close() overrides the wired close to save state then call close_windows
- M.resume(), M.resume_find_files(), M.resume_live_grep() public API
- Per-mode saved state (find_files vs live_grep)

In layout_manager.lua:
- Extracted close_windows() as the low-level cleanup
- close() now delegates to close_windows()

In main.lua:
- find_files and live_grep support opts.resume
- M.resume() public API for :FFFResume command

plugin/fff.lua:
- :FFFResume user command
@thuan1412 thuan1412 changed the title Feat/enhance cycle forward function feat: enhance cycle forward function Jun 14, 2026
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