hadronized / hop.nvim

Neovim motions on speed!
Other
2.47k stars 137 forks source link

HopChar2 command not work when cursor place at the empty line #351

Open louishuyng opened 1 year ago

louishuyng commented 1 year ago

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

louishuyng commented 1 year ago

I raised a PR here for fixing https://github.com/phaazon/hop.nvim/pull/350

nonetallt commented 1 year ago

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:

yanshay commented 1 year ago

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

But not with hop.hint_char1()

Xlator commented 1 year ago

Also happening with hop.hint_lines()

Xlator commented 1 year ago

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
}
awerebea commented 1 year ago

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

Why hasn't it merged yet?

farzadmf commented 1 year ago

~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)

farzadmf commented 1 year ago

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

yanshay commented 1 year ago

a fix submitted in PR #358

farzadmf commented 1 year ago

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

yanshay commented 1 year ago

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

changed the comment accordingly