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

bug: Using require('flash').jump while deleting backwards in inclusive mode produces different behaviour than dF motion

Open DanWlker 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)

0.10.1

Operating system/version

MacOS 14.6.1

Describe the bug

'x', 'o'
      ^

using motion dsxa

''
 ^

'x', 'o'
      ^

using motion dFx

'o'
 ^

Steps To Reproduce

Here's my config:

{
  'folke/flash.nvim',
  event = 'VeryLazy',
  opts = {},
  keys = {
    {
      's',
      mode = { 'n', 'x', 'o' },
      function()
        require('flash').jump {
          search = {
            multi_window = false,
          },
        }
      end,
      desc = 'Flash (On the character)',
    },
  },
}

Expected Behavior

dsxa and dFx should match

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',
      event = 'VeryLazy',
      opts = {},
      keys = {
        {
          's',
          mode = { 'n', 'x', 'o' },
          function()
            require('flash').jump {
              search = {
                multi_window = false,
              },
            }
          end,
          desc = 'Flash (On the character)',
        },
      },
    },
  },
}

DanWlker avatar Oct 03 '24 16:10 DanWlker