Skip to content
This repository was archived by the owner on Apr 16, 2026. It is now read-only.

highlighting both tags#1653

Closed
sathyamoorthi wants to merge 1 commit intocodemirror:masterfrom
sathyamoorthi:tag-highlight
Closed

highlighting both tags#1653
sathyamoorthi wants to merge 1 commit intocodemirror:masterfrom
sathyamoorthi:tag-highlight

Conversation

@sathyamoorthi
Copy link
Copy Markdown
Contributor

Some code changes to highlight both tags. I felt highlighting both tags are necessary when tags needs to be find by scrolling. What do you think ?

Comment thread addon/edit/matchtags.js
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

If it is not a real tag hit, we don't need to loop through all the times.

@marijnh
Copy link
Copy Markdown
Member

marijnh commented Jul 3, 2013

I prefer the way things look when only the 'other' tag is highlighted, so I'm going to keep the addon in the distribution the way it is.

@marijnh marijnh closed this Jul 3, 2013
@sathyamoorthi
Copy link
Copy Markdown
Contributor Author

but the check at 30th line will improve performance a lot. without that check it will mostly scan the document while user scrolls.

@marijnh
Copy link
Copy Markdown
Member

marijnh commented Jul 3, 2013

Did you benchmark, or are you just making things up? I'm asking because my old code did the same thing, or at least it tried to do the same thing, and I can't see a reason why it should be broken.

@sathyamoorthi
Copy link
Copy Markdown
Contributor Author

Whatever you have now is perfect. I am just trying to avoid unwanted scans.
Let me try to explain this better on our
discussionhttps://groups.google.com/forum/#!topic/codemirror/ngS7c1aBbJg
.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants