Skip to content
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

fix(grep_string): cast search value to string #3319

Merged
merged 1 commit into from
Oct 6, 2024

Conversation

jamestrew
Copy link
Contributor

When using the vim command API and passing a number to the search option of grep_string (eg. :Telescope grep_string search=3), the number is passed as a number. This eventually causes a type error at string.gsub as the search value is expected to be a string.

We'll just cast search value to a string.

closes #3310

When using the vim command API and passing a number to the `search`
option of `grep_string` (eg. `:Telescope grep_string search=3`), the
number is passed as a number. This eventually causes a type error at
`string.gsub` as the `search` value is expected to be a string.

We'll just cast `search` value to a string.
@jamestrew jamestrew merged commit dc6fc32 into nvim-telescope:master Oct 6, 2024
12 checks passed
@jamestrew jamestrew deleted the grep_string-cast-search branch October 6, 2024 02:11
@jamestrew jamestrew added the backport-0.1.x PR to be backported to 0.1.x (Neovim 0.7 compat) label Oct 6, 2024
@zigotica
Copy link

zigotica commented Oct 6, 2024

thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-0.1.x PR to be backported to 0.1.x (Neovim 0.7 compat)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Does live_grep work with number instead of string?
2 participants