-
-
Notifications
You must be signed in to change notification settings - Fork 619
fix: searchcount exception on invalid search regex #2693
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
Conversation
I don't get that error, only |
I can reproduce, this fix seems reasonable |
Doesn't wrapping in |
Idea with
I think the problem here is error which interrupts the default behaviour, but the behaviour is correct(if we hide the error), isn't it? Are you about adding info log or something like this or more complex changes? |
Looks like I made that change: nvim-lualine/lualine.nvim#1088
I reckon this should be classed as a vim bug: the initial search throws the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works nicely for hijack_cursor
:
- valid, no match
- valid, match
- invalid
Hi there, I encountered an error message generated by
vim.fn.searchcount
inM.place_cursor_on_node
function when havinghijack_cursor
option enabled.I don't know if this fix is wanted or not, its just something that bothered me when using
vim.fn.searchcount
and I noticed it occurring when opening NvimTree.Using
pcall
should fix the occurrence of the error message generated byvim.fn.searchcount
as showing this error seems to be irrelevant to theM.place_cursor_on_node
function:To reproduce I just search for
(
in my neovim, then open nvim-tree./\v(
:NvimTreeOpen