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

Desktop: Add scrollTo option to editor search highlighter #3593

Merged
merged 1 commit into from
Aug 8, 2020

Conversation

CalebJohn
Copy link
Collaborator

Only scroll to search matches when the user changes the search or explicitly changes the search index
https://discourse.joplinapp.org/t/codemirror-feedback/10397

The main functional change here is that the scrollIntoView will only be called if the keyword is the first in a multiple word search (this happens on the global search) and either the keyword has changed or the user has explicitly changed the index.

I also made some changes to the highlightSearch function because I noticed that it was creating an array and only adding one element to it 😆

Only scroll to search matchs when the user changes the search or
explicitly changes the search index
https://discourse.joplinapp.org/t/codemirror-feedback/10397
@laurent22 laurent22 merged commit e1144c0 into laurent22:dev Aug 8, 2020
@laurent22
Copy link
Owner

Looks good too, thanks!

@CalebJohn CalebJohn deleted the editor-search-scroll branch August 9, 2020 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants