linrongbin16/fzfx.nvim

Feature Request: different nvim editor instances will affect each other `resume` variant ?

linrongbin16 opened this issue · 0 comments

current implementations of resume previous search variant is using a cache file to store the user's input query meta info. Thus when user use the resume variant, it will read the cache file and restore previous user's input query.

But when there're multiple (say, two) nvim instances running at the same time, say A and B, and user operating the two editors follow below sequences:

  1. in A, run FzfxFiles and input config.lua, then quit. Then the resume cache file will store config.lua as previous user query.
  2. in B, run FzfxFiles and input helper, then quit. Then the resume cache file will store helper as previous user query.
  3. back in A, run FzfxFilesR to try to restore previous search, but it will prefill helper from the cache file, which is not user expected.

Solution:

Save the previous query info in plugin's memory context, so two different nvim editor will have separate context and won't affect each other.