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

Display leading and trailing whitespaces in search-in-workspace results #5989

Merged
merged 1 commit into from
Aug 20, 2019

Conversation

vince-fugnitto
Copy link
Member

What it does

Fixes #5987

  • fixed an issue where leading and trailing whitespaces were not being displayed
    from the search-in-workspace result tree leading to confusion and overall an
    annoying behavior.
  • added an additional test to ripgrep-search-in-workspace-server.slow-spec.ts which
    tests the result of a search including a trailing whitespace.
  • added an additional test to ripgrep-search-in-workspace-server.slow-spec.ts which
    tests the result of a search including a leading whitespace.

How to test

  • open an example workspace (ex: theia/packages/bunyan)
  • open the search-in-workspace widget (view menu + search menu item)
  • perform a search with a leading whitespace (the search results should display the leading whitespace as well)
  • perform a search with a trailing whitespace (the search results should display the trailing whitespace as well)
  • perform the leading and trailing whitespace searches again with the replace functionality enabled (click the toggle replace icon (small triangle) and enter a replace term) - the leading and trailing whitespaces should also be displayed with the strikethrough)

Review checklist

Reminder for reviewers

Signed-off-by: Vincent Fugnitto vincent.fugnitto@ericsson.com

@vince-fugnitto vince-fugnitto added bug bugs found in the application search in workspace issues related to the search-in-workspace labels Aug 19, 2019
@vince-fugnitto vince-fugnitto self-assigned this Aug 19, 2019
@elaihau
Copy link
Contributor

elaihau commented Aug 20, 2019

Tested in example browser, and I can confirm

  • it works for both acii and unicode characters
  • it works for single space & multiple spaces

after entered "tabs" into the editor and performed a search, theia is like dead. but I don't think it is related to this pull request.

@elaihau
Copy link
Contributor

elaihau commented Aug 20, 2019

I am not able to reproduce the problem I described earlier (i.e., entered "tabs" into the editor and performed a search, and then theia is dead). Ignore it please.

Fixes #5987

- fixed an issue where leading and trailing whitespaces were not being displayed
from the `search-in-workspace` result tree leading to confusion and overall an
annoying behavior.
- added an additional test to `ripgrep-search-in-workspace-server.slow-spec.ts` which
tests the result of a search including a trailing whitespace.
- added an additional test to `ripgrep-search-in-workspace-server.slow-spec.ts` which
tests the result of a search including a leading whitespace.

Signed-off-by: Vincent Fugnitto <vincent.fugnitto@ericsson.com>
Copy link
Contributor

@AlexTugarev AlexTugarev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much! Works nicely!

@vince-fugnitto
Copy link
Member Author

Thank you @elaihau @AlexTugarev for the review :)

@vince-fugnitto vince-fugnitto merged commit 70c68a2 into master Aug 20, 2019
@vince-fugnitto vince-fugnitto deleted the vf/GH-5987 branch August 20, 2019 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application search in workspace issues related to the search-in-workspace
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Search preview is missing trailing whitespaces
3 participants