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

SIW: Support 'search.smartCase' #9408

Merged
merged 1 commit into from
May 5, 2021

Conversation

DucNgn
Copy link
Contributor

@DucNgn DucNgn commented Apr 27, 2021

What it does

The following commit adds support for the preference 'search.smartCase'.
When the preference is true, search is case-insensitive if the pattern
is all lowercase, otherwise search is case-sensitive.

How to test

With search.smartCase turned on (default is off).

  • Search for a term (all characters in query are lowercase) in SIW view. (i.e: search for hello)
  • Observe that the search is case-insensitive (Hello, HeLlo , etc are shown up in the result view).
  • Change the search term to a query that contains at least an uppercase letter. (i.e: search for Hello).
  • Observe that the search is now case-sensitive (heLlo, hello are now not showing up).

Review checklist

Reminder for reviewers

Signed-off-by: Duc Nguyen [email protected]

@vince-fugnitto vince-fugnitto added enhancement issues that are enhancements to current functionality - nice to haves search in workspace issues related to the search-in-workspace labels Apr 27, 2021
@DucNgn DucNgn force-pushed the dn/SIW-smartCase branch from 2a2c80a to 1907c40 Compare April 27, 2021 20:53
The following commit adds support for the preference 'search.smartCase'.
When the preference is true, search is case-insensitive if the pattern
is all lowercase, otherwise search is case-sensitive.

Signed-off-by: Duc Nguyen <[email protected]>
@DucNgn DucNgn force-pushed the dn/SIW-smartCase branch from 1907c40 to a922468 Compare April 27, 2021 20:55
Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

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

I confirm that the pull-request works for the following use-cases:

  • search results are case-insensitive by default.
  • search results still respect the available options (match case).
  • search results are case-intensive when the preference is on, and the query is lowercase.
  • search results are case sensitive when the preference is on, and the query contains at least one uppercase character.
  • search results are correctly re-applied on startup with the preference on.

@vince-fugnitto
Copy link
Member

@alvsan09 would you like to review as well since you're now familiar with siw? :)

@alvsan09
Copy link
Contributor

alvsan09 commented May 5, 2021

@alvsan09 would you like to review as well since you're now familiar with siw? :)

Sure, I will review it and test it !!

Copy link
Contributor

@alvsan09 alvsan09 left a comment

Choose a reason for hiding this comment

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

I have reviewed the change and have no comments,
it also works as expected!
Thanks Duc !

@vince-fugnitto vince-fugnitto merged commit 6a8af03 into eclipse-theia:master May 5, 2021
@vince-fugnitto vince-fugnitto deleted the dn/SIW-smartCase branch May 5, 2021 17:16
@vince-fugnitto vince-fugnitto added this to the 1.14.0 milestone May 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement issues that are enhancements to current functionality - nice to haves search in workspace issues related to the search-in-workspace
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants