-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jump to last search when doing :s/ #60
Comments
Seems to be the case also with this minimal config: vim.cmd [[set runtimepath=$VIMRUNTIME]]
vim.cmd [[set packpath=/tmp/nvim/site]]
vim.g.loaded_remote_plugins = 1
local package_root = '/tmp/nvim/site/pack'
local install_path = package_root .. '/packer/opt/packer.nvim'
local compile_path = package_root .. '/packer/start/packer_compiled/plugin/packer_compiled.lua'
local function load_plugins()
vim.cmd('packadd packer.nvim')
require('packer').startup{
{
{
'wbthomason/packer.nvim',
module = 'packer',
cmds = {'PackerSync'},
config = function()
end,
},
{
'kevinhwang91/nvim-hlslens',
keys = '/',
module = 'hlslens',
setup = function()
local noremap = {noremap = true}
local silent = {noremap = true, silent = true}
vim.api.nvim_set_keymap('n', 'n', '<Cmd>execute("normal! " . v:count1 . "n")<CR><Cmd>lua require("hlslens").start()<CR>zzzv', silent)
vim.api.nvim_set_keymap('n', 'N', '<Cmd>execute("normal! " . v:count1 . "N")<CR><Cmd>lua require("hlslens").start()<CR>zzzv', silent)
vim.api.nvim_set_keymap('n', '*', '*<Cmd>lua require("hlslens").start()<CR>', noremap)
vim.api.nvim_set_keymap('n', '#', '#<Cmd>lua require("hlslens").start()<CR>', noremap)
vim.api.nvim_set_keymap('n', 'g*', 'g*<Cmd>lua require("hlslens").start()<CR>', noremap)
vim.api.nvim_set_keymap('n', 'g#', 'g#<Cmd>lua require("hlslens").start()<CR>', noremap)
end,
config = function()
require('hlslens').setup()
end,
},
},
config = {
auto_clean = false,
package_root = package_root,
compile_path = compile_path,
display = { non_interactive = true },
},
}
end
_G.load_config = function()
end
if vim.fn.isdirectory(install_path) == 0 then
print("Cloning packer.")
print(vim.fn.system { 'git', 'clone', '--depth=1', 'https://github.com/wbthomason/packer.nvim', install_path })
if vim.v.shell_error ~= 0 then
print('got error, aborting')
return
end
else
print("Packer already cloned.")
end
if vim.fn.filereadable(compile_path) == 0 then
load_plugins()
print("Sync packer")
require('packer').sync()
vim.cmd [[autocmd User PackerComplete ++once echo "Ready!" | lua load_config()]]
else
load_config()
end |
Reproduced |
kevinhwang91
added a commit
that referenced
this issue
Jan 12, 2023
Thanks @kevinhwang91, unfortunately I'm still seeing the same issue. |
Can confirm that it works as expected now, thanks! 🚀 |
Great. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
nvim --version
: v0.8.2Describe the bug
A clear and concise description of what the bug is.
If I first search for something, let's say for foo in the following file:
then I clear the search and move to the line with
bar
and I start typing:s/fo
to replace something on the second line (which does not exist in this case), then the cursor jumps to the first line which seems to be caused byhlslens
.To Reproduce using
nvim -u mini.lua
with
Screenshots
hlslens_bug.mp4
Additional context
I haven't tried it yet with a minimal config. Maybe something is going wrong with this and live preview?
The text was updated successfully, but these errors were encountered: