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

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

Open simonmandlik opened this issue 1 year ago • 7 comments

Did you check docs and existing issues?

  • [X] I have read all the flash.nvim docs
  • [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)

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]]

simonmandlik avatar Aug 28 '23 11:08 simonmandlik

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

jemag avatar Oct 18 '23 21:10 jemag

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 Jul 06 '24 01:07 github-actions[bot]

please keep

simonmandlik avatar Jul 06 '24 07:07 simonmandlik

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 Aug 07 '24 01:08 github-actions[bot]

please keep

simonmandlik avatar Aug 07 '24 09:08 simonmandlik

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 Sep 07 '24 01:09 github-actions[bot]

please keep

simonmandlik avatar Sep 08 '24 09:09 simonmandlik

Same issue with settings incremetal to true but not enable search mode. After that, dt or ct isn't work as usual.

opts = {
  search = {
    incremental = false,
  },
  mode = {
    search = {
      enabled = false,
    },
  },
}

Pagliacii avatar Oct 05 '24 06:10 Pagliacii