Skip to content

bug: broken df / cf #442

@shushtain

Description

@shushtain

Did you check docs and existing issues?

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

Neovim version (nvim -v)

0.11.3

Operating system/version

Arch Linux

Describe the bug

When I use "char"-mode as part of delete/change command, it seems to delete/change from the first occurrence of char to the one specified with a jump label, as opposed to what I would expect: delete/change from cursor to a jump label.

Here is an example where I pick jump label "x":

Image Image Image

Here is the part of config that seems to be the most relevant:

      char = {
        enabled = true,
        autohide = true,
        jump_labels = true,
        multi_line = true,
        label = { exclude = "hjkliardc" },
        keys = { "f", "F", "t", "T", ";", "," },
        search = { wrap = false },
        highlight = { backdrop = true },
        jump = { register = false, autojump = true },
      },

Terribly sorry if I didn't find the same issue or set up something incorrectly.

Steps To Reproduce

  1. Set up char mode similar to the provided config.
  2. Find a line with several identical characters.
  3. Use df<char> or cf<char> and choose later label.

Expected Behavior

Expected to delete from the cursor to the chosen jump 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 = {} },
    -- add any other plugins here
  },
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstale

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions