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

:HopChar1CurrentLineAC creates two jump characters instead of just jumping

Open araaha opened this issue 1 year ago • 0 comments

Describe the bug When using :HopChar1CurrentLineAC with the cursor on some character X, if there is at least one more X ahead on the line, :HopChar1CurrentLineAC creates a jump character for where the cursor is as well as all subsequent Xs.

To Reproduce Steps to reproduce the behavior:

-- bootstrap lazy
        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)

-- install hop.nvim
        local plugins = {
          { "smoka7/hop.nvim", opts = {} },
        }
        require("lazy").setup(plugins,{})
--- How You use hop...

Suppose we have the line live love laugh with the cursor on the l on love. Running :HopChar1CurrentLineAC will create a jump character to jump on the l for love and another one to jump on the l for laugh.

Expected behavior The cursor should jump directly to the l on love without creating a jump character, similar to what you would expect with using f,t,F,T.

version (please complete the following information):

  • Nvim version: 9.0.2
  • hop.nvim version: master

Additional context This also applies to :HopChar1CurrentLineBC (but is perhaps expected behaviour for :HopChar1CurrentLine?)

araaha avatar Sep 19 '23 21:09 araaha