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

bug: autojump doesn't work with terminal buffer

Open echaya opened this issue 4 months ago • 0 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.11.4

Operating system/version

windows 11 / RHEL 8/ WSL

Describe the bug

autojump fails when there is a single match and the match is in terminal/REPL buffer

Steps To Reproduce

  1. autojump is enabled for jump:
  2. open an empty buffer, type something. then open a vertical (or horizontal) terminal buffer.
  3. move the cursor back
  4. press s then something unique in the terminal buffer
  5. the jump will be aborted when the only match is the terminal buffer.

Image

Expected Behavior

the cursor to be landed on the only match in the terminal buffer

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 = {},
      keys = {
        {
          "s",
          mode = { "n", "x", "o" },
          function()
            require("flash").jump({
              search = { multi_window = true },
              jump = { autojump = true },
            })
          end,
          desc = "Flash",
        },
      },
    },
  },
})

echaya avatar Oct 22 '25 11:10 echaya