flash.nvim icon indicating copy to clipboard operation
flash.nvim copied to clipboard

bug: Search mode does not trigger on label

Open tobsz opened this issue 2 months ago • 2 comments

Did you check docs and existing issues?

  • [x] I have read all the flash.nvim docs
  • [x] I have updated the plugin to the latest version before submitting this issue
  • [x] I have searched the existing issues of flash.nvim
  • [x] I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

v0.12.0-dev-1351+g8151fc59cf

Operating system/version

Arch Linux

Describe the bug

With opts = { modes = { search = { enabled = true }}} when searching for a term, which has no match on the initially visible buffer view, so that the view jumps to show the first match, as soon as the label character is typed it is not recognized as the label but the search term is extended with the label character and the search jumps back to the initial view, because there are no matches.

Steps To Reproduce

  1. Install lazyvim,
  2. Create file lua/plugins/flash.lua with content:
    return {
      { "folke/flash.nvim",
        opts = { modes = { search = { enabled = true } } }
      }
    }
    
  3. Open file which is longer than one buffer view, and search for term outside of the initial view and type attached label.

Expected Behavior

Jump to search term highlighted with the typed label

Repro

vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()

require("lazy.minit").repro({
  spec = {
    { "folke/flash.nvim", opts = { modes = { search = { enabled = true } } } },
  },
})

tobsz avatar Oct 04 '25 10:10 tobsz

I confirm I see the same behaviour on nvim v0.12.0-dev-1341+g28ccebd138; generally it seems that flash behaviour is a little erratic on the nightly builds altogether.

gennaro-tedesco avatar Oct 05 '25 20:10 gennaro-tedesco

I am experiencing the same issue as the OP. I'm not on the nightly Neovim version but on 0.11.4.

Geerayef avatar Oct 27 '25 20:10 Geerayef

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Nov 27 '25 02:11 github-actions[bot]

The problem is still persisting.

tobsz avatar Nov 28 '25 16:11 tobsz