Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Error when 'f' on empty line #352

Closed
yanshay opened this issue Jan 22, 2023 · 3 comments
Closed

Error when 'f' on empty line #352

yanshay opened this issue Jan 22, 2023 · 3 comments

Comments

@yanshay
Copy link

yanshay commented Jan 22, 2023

When cursor is on an empty line, when executing:

hop.hint_char1({ direction = directions.AFTER_CURSOR, current_line_only = true })

generates the following error

E5108: Error executing lua: ...re/nvim/site/pack/packer/start/hop.nvim/lua/hop/init.lua:129: col value outside range
stack traceback:
        [C]: in function 'nvim_buf_set_extmark'
        ...re/nvim/site/pack/packer/start/hop.nvim/lua/hop/init.lua:129: in function 'set_unmatched_lines'
        ...re/nvim/site/pack/packer/start/hop.nvim/lua/hop/init.lua:141: in function 'apply_dimming'
        ...re/nvim/site/pack/packer/start/hop.nvim/lua/hop/init.lua:360: in function 'hint_with_callback'
        ...re/nvim/site/pack/packer/start/hop.nvim/lua/hop/init.lua:310: in function 'hint_with'
        ...re/nvim/site/pack/packer/start/hop.nvim/lua/hop/init.lua:523: in function 'hint_char1'
        /Users/my_user/.config/nvim/lua/user/hop.lua:31: in function </Users/my_user/.config/nvim/lua/user/hop.lua:30>

It works fine when cursor is not on an empty line.

Also, at the same time,

hop.hint_char1()

Works well when cursor is on empty lines.

My setup is:

hop.setup({
	jump_on_sole_occurrence = false,
	multi_windows = true,
})
@yanshay yanshay closed this as completed Jan 22, 2023
@yanshay
Copy link
Author

yanshay commented Jan 22, 2023

Duplicate of #349

@nonetallt
Copy link

Duplicate of #349

Did you mean to reference #351 instead? I don't see how 349 is related.

@yanshay
Copy link
Author

yanshay commented Jan 22, 2023

Yes, my mistake.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants