hadronized/hop.nvim

HopChar2 command not work when cursor place at the empty line

louishuyng opened this issue ยท 11 comments

HopChar2 command does not work when the cursor is placed at an empty line and shows this error popup below
Screenshot 2023-01-13 at 00 24 27

I raised a PR here for fixing
#350

Looking through the history of issues, this one has been raised multiple times in the past and was supposed to fixed. However I can confirm that it's still happening, not sure if it affects all commands (seems likely), but I'm having the same issue with both of these commands:

  • HopWordBC
  • HopWordAC

Also with hop.hint_char1({ direction = directions.AFTER_CURSOR, current_line_only = false })

But not with hop.hint_char1()

Also happening with hop.hint_lines()

Fixed by @aznhe21 (branch fix-some-bugs)

Packer config

use {
    'aznhe21/hop.nvim',
    branch = 'fix-some-bugs', -- optional but strongly recommended
    config = function()
        require'hop'.setup()
    end
}

Fixed by @aznhe21 (branch fix-some-bugs)

Why hasn't it merged yet?

The repo that supposedly has the fix doesn't event exist! ๐Ÿค”

Ignore that, the link seems to have a typo; proper repo is https://github.com/aznhe21/hop.nvim (in the config it's correct, but the hyperlink is wrong)

The fixes don't cover my use case: I think it happens where the line doesn't fit the "visible" width (example: having 2 vertical splits besides each other). and you need to "scroll" the line to see the end

a fix submitted in PR #358

@yanshay just a small thing: usually, one only says "fixed" (past tense) after a PR is merged

@yanshay just a small thing: usually, one only says "fixed" (past tense) after a PR is merged

changed the comment accordingly