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

HopChar2 command not work when cursor place at the empty line

Open louishuyng opened this issue 2 years ago • 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

louishuyng avatar Jan 12 '23 17:01 louishuyng

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

louishuyng avatar Jan 12 '23 17:01 louishuyng

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

nonetallt avatar Jan 16 '23 11:01 nonetallt

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

But not with hop.hint_char1()

yanshay avatar Jan 22 '23 16:01 yanshay

Also happening with hop.hint_lines()

Xlator avatar Jan 28 '23 20:01 Xlator

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
}

Xlator avatar Jan 30 '23 14:01 Xlator

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

Why hasn't it merged yet?

awerebea avatar Feb 15 '23 06:02 awerebea

~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 avatar Feb 20 '23 02:02 farzadmf

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

farzadmf avatar Feb 20 '23 03:02 farzadmf

a fix submitted in PR #358

yanshay avatar Apr 08 '23 09:04 yanshay

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

farzadmf avatar Apr 13 '23 01:04 farzadmf

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

changed the comment accordingly

yanshay avatar Apr 13 '23 08:04 yanshay