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

fix(char): highlight only the current line when multi_line=false, closes #179

Open myypo opened this issue 2 years ago • 6 comments

Fixes #179

I think, pcall might be removed by adding an explicit line len check.

myypo avatar Nov 26 '23 20:11 myypo

I tried your branch and it still highlights multiple lines.

I might be missing something. Here's my config:

  "MyyPo/flash.nvim",
  branch = "bugfix/highlight-only-current-line-when-multi-false",
  keys = {
  {
      "<leader>l",
      mode = { "n", "x", "o" },
      function()
        require("flash").jump({
          search = {
            mode = "search",
            max_length = 0,
            forward = true,
            wrap = false,
            multi_line = false,
          },
          label = { after = { 0, 0 } },
          pattern = [[\<]],
        })
      end,
      desc = "Flash jump word forward"
    },
  }

image

gerazov avatar Jan 25 '24 23:01 gerazov

I tried your branch and it still highlights multiple lines.

I might be missing something. Here's my config:

  "MyyPo/flash.nvim",
  branch = "bugfix/highlight-only-current-line-when-multi-false",
  keys = {
  {
      "<leader>l",
      mode = { "n", "x", "o" },
      function()
        require("flash").jump({
          search = {
            mode = "search",
            max_length = 0,
            forward = true,
            wrap = false,
            multi_line = false,
          },
          label = { after = { 0, 0 } },
          pattern = [[\<]],
        })
      end,
      desc = "Flash jump word forward"
    },
  }

image

The PR affects only the char mode triggered by pressing f/F/t/T by default. And multi_line option is only applicable to the char mode.

myypo avatar Jan 26 '24 07:01 myypo

Oh - didn't catch that, I'll raise another issue for multi_line in jumping mode. :pray:

gerazov avatar Jan 26 '24 15:01 gerazov

This PR is stale because it has been open 60 days with no activity.

github-actions[bot] avatar Jul 06 '24 01:07 github-actions[bot]

when it will be merge?

Marskey avatar Oct 19 '24 07:10 Marskey