You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The cursor is on the position P. Use :HopChar1 to hop somwhere and the ctrl-o to jump back. Cursor is not on the original position P.
To Reproduce
Configuration:
local root = vim.fn.fnamemodify("./.repro", ":p")
-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath, })
end
vim.opt.runtimepath:prepend(lazypath)
-- install plugins
local plugins = {
{ "smoka7/hop.nvim", opts = {} },
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
Steps to reproduce the behavior:
Let's have a file with simple content:
first
second
third
Put the cursor on the first line on character r.
Run :HopChar1, use character i, so you get two targets (a in the word first and s in the word third) - choose s
Press ctrl-o to jump back
You are on character f in the word first
Expected behavior
After jump back by ctrl-o, you should be on the character r in the word first - the place before hop.
Version (please complete the following information):
Nvim version: 0.9.1
hop.nvim version: master
Additional context
Additionally - in the more complex content, the cursor is not even on the same line after ctrl-o.
Thank you for maintaining hop.nvim after the original project become unmaintained. However, after switch to this repo this issue appeared. It breaks e.g. following workflow: hop somewhere, cut/yank some content, jump back and put the content there.
The text was updated successfully, but these errors were encountered:
Thanks for the report, it's a bug in upstream neovim/neovim#17861 .
The original code used vim.cmd("normal! m'") and when I changed it to new api I wasn't aware of ctrl-o and only tested it with ``.
Maybe we should revert it till that issue gets fixed.
Describe the bug
The cursor is on the position P. Use
:HopChar1
to hop somwhere and thectrl-o
to jump back. Cursor is not on the original position P.To Reproduce
Configuration:
Steps to reproduce the behavior:
r
.:HopChar1
, use characteri
, so you get two targets (a
in the wordfirst
ands
in the wordthird
) - chooses
ctrl-o
to jump backf
in the wordfirst
Expected behavior
After jump back by
ctrl-o
, you should be on the characterr
in the wordfirst
- the place before hop.Version (please complete the following information):
Additional context
Additionally - in the more complex content, the cursor is not even on the same line after
ctrl-o
.Thank you for maintaining hop.nvim after the original project become unmaintained. However, after switch to this repo this issue appeared. It breaks e.g. following workflow: hop somewhere, cut/yank some content, jump back and put the content there.
The text was updated successfully, but these errors were encountered: