Skip to content

[mini.jump] Consumes a char on dot-repeat when target not in text #2290

@abeldekat

Description

@abeldekat

Contributing guidelines

Module(s)

mini.jump

Neovim version

0.12 (!at least latest Nightly build!)

Description

Related: Jump consumes characters when it cannot find the target #688

Issue #688 was fixed in commit 4f69339

Although the fix was applied with dot-repeat in mind, the test scenario from OP still fails for dot-repeat, also on Neovim v0.9.5

The applied solution does not target dot-repeat, as only the initial jump enters vim.schedule in make_expr

Reproduction

  1. Create separate 'nvim-repro' config directory:

    • '~/.config/nvim-repro/' on Unix
    • '~/AppData/Local/nvim-repro/' on Windows
  2. Inside 'nvim-repro' directory create a file named 'init.lua'.
    Populate it with the following content:

vim.pack.add({ "https://github.com/nvim-mini/mini.nvim" })
require("mini.jump").setup()
  1. Run NVIM_APPNAME=nvim-repro nvim (i.e. execute nvim with NVIM_APPNAME environment variable set to "nvim-repro").
    Wait for all dependencies to install.

  2. Replace this with description of interactive reproduction steps along with the behavior you observe.
    Feel free to include images/videos/etc, this helps a lot.

jump_consumes_char.mp4

Text in testfile:

alice bob mark
alice
  • Place cursor on line 1, first column
  • Type: dfm
  • Type: .
  • Observe that the "a" from "mark" has been consumed

Alternatively:

  • Place cursor on line 1, on the "a" in "mark"
  • Type: dfm
  • Type: .
  • Observe that the "a" from "mark" has been consumed
What to do after reporting an issue

After reporting the issue, it is safe (and even recommended for cleaner possible future bug reports) to remove 'nvim-repro' config from the system:

  • Delete config directory ('~/.config/nvim-repro' on Unix).
  • Delete data directory ('~/.local/share/nvim-repro' on Unix).
  • Delete state directory ('~/.local/state/nvim-repro' on Unix).

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions