folke / flash.nvim

Navigate your code with search labels, enhanced character motions and Treesitter integration
Apache License 2.0
2.24k stars 28 forks source link

bug: "trigger" key not working when searching with `incsearch` on outside of visible area #221

Open simonmandlik opened 10 months ago

simonmandlik commented 10 months ago

Did you check docs and existing issues?

Neovim version (nvim -v)

0.9.1

Operating system/version

MacOS 13.4.1

Describe the bug

When searching with incsearch on for a pattern outside of the visible area, the trigger key is not working.

https://github.com/folke/flash.nvim/assets/16707112/e7832cbd-c732-41b8-b5e6-0dafdba2afd2

Steps To Reproduce

  1. nvim -u repro.lua
  2. search for a pattern inside the visible area. Press ; and the label. The jump is performed.
  3. search for a pattern outside of the visible area. Press ;. The ; is not registered as a trigger key.

Expected Behavior

Pressing ';' and label should jump to the pattern

Repro

local root = vim.fn.fnamemodify("./.repro", ":p")
for _, name in ipairs({ "config", "data", "state", "cache" }) do
    vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
    vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath, })
end
vim.opt.runtimepath:prepend(lazypath)

local plugins = {
    "folke/flash.nvim",
    opts = {
        search = {
            trigger = ";"
        }
    }
}

require("lazy").setup(plugins, {
root = root .. "/plugins",
})

vim.cmd[[set termguicolors]]
jemag commented 8 months ago

can reproduce the issue. Using sj.nvim again in the meantime

github-actions[bot] commented 4 days ago

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.

simonmandlik commented 4 days ago

please keep