-
Notifications
You must be signed in to change notification settings - Fork 155
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
Add support for TCL and fix some bugs #366
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
phikal
reviewed
Sep 12, 2020
Since the current implementation always adds one before returning it can never return 0, even when the start of the symbol is at the start of the line. This means that if the symbol is at the start of the line the :left side will be the first letter of the symbol instead of empty.
Currently if no file extensions are specified then git grep will not be given a path and will therefore only search from the current directory instead of the root. So in that case we add the magic path (:/) to search from the project root. Note that this only works in Git versions greater then 1.7.6.
4de303b
to
83d383f
Compare
jacktasia
reviewed
Sep 13, 2020
Thanks for opening this! I just had a small question above |
jacktasia
approved these changes
Sep 14, 2020
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.
Thanks!
jobor
pushed a commit
to jobor/dumb-jump
that referenced
this pull request
Feb 18, 2025
* Add support for tcl * Fix issue when symbol is at the start of line Since the current implementation always adds one before returning it can never return 0, even when the start of the symbol is at the start of the line. This means that if the symbol is at the start of the line the :left side will be the first letter of the symbol instead of empty. * Fix issue with git grep when no file extensions are specified Currently if no file extensions are specified then git grep will not be given a path and will therefore only search from the current directory instead of the root. So in that case we add the magic path (:/) to search from the project root. Note that this only works in Git versions greater then 1.7.6.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds support for TCL and fixes some bugs I found along the way. I can split it into multiple PR's if needed, but my TCL code does not work without the bug fixes here.
bugs:
:left
and:right
of a symbol does not work correctly when the symbol is at the start of the line.You can see this with
notice that the left side is "f", which is not correct. I also took the chance to simplify the code and update the tests.
Currently if no file extensions are specified then git grep will not be given a path and will therefore only search from the current directory instead of the root. So in that case we add the magic path
:/
to search from the project root. Note that this only works in Git versions greater then 1.7.6.