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
[Bug?] Search doesn't search entire file #8
Comments
The design of the command is such that it searches from the cursor position forwards by default. To search backwards, the Nevertheless, I can see the use of being able to search the entire file. I guess the cleanest solution would be to add a new parameter that wraps around when the end or beginning of the file is encountered. Is that something you could live with? |
Yes a parameter would be fantastic.
Yes I did suspect that it was a design decision on your part :-). I can't speak for others but I'd guess that most people would expect a search to go through the entire file. E.g. vscode's Anyways I'm already happy if I can opt-in with a parameter. |
Btw. I'm curious: why did you design it that way? |
I chose the design to allow using the same command for jumping to a specific character(s). Like with Vim's
If you always want to start the find from the beginning there is an easy workaround: use the [
"cursorTop",
{
"command": "modaledit.search",
"args": {
"caseSensitive": true
}
}
] |
In version 2.0 there is a new parameter |
If I make a forward-search at the end of the file then I won't get any result because forward search only searches from current line to end of file. It doesn't consider any previous lines.
In my experience this is unusual.
What do you think of making
modaledit.search
always search the entire file instead?The text was updated successfully, but these errors were encountered: