Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Problems when searching for text #683

Closed
gjtorikian opened this Issue Mar 29, 2012 · 2 comments

Comments

Projects
None yet
3 participants
Contributor

gjtorikian commented Mar 29, 2012

This one is kind of hard to explain; I tried to summarize what I found in this comment: ajaxorg/cloud9@91311fe#L333

Okay, so let's say the doc has the string juhu. If you search for j, the j in juhu is highlighted. Great.

However, let's say you now decide to search for ju. Since j is highlighted, you would think that it would match the ju in juhu, but that's not what happens. The search fails. Actually, if you chose instead to find u, the u would then properly highlight. If, whilst on j, you chose to search for uh, that too would highlight.

Basically, even though the selection is on j, the cursor is after j, so subsequent string searches provide awkward behaviors. This actually may be very well intended, so perhaps there should be a new property/option for search that overrides this.

The workaround in C9 is to check if the highlighted range (j) is the start of the next search term (ju); if it is, the cursor shifts back one char, so that the search for ju properly highlights ju. This is really used for a "quicksearch"-like implementation, as we've used it.

Contributor

fjakobs commented Apr 6, 2012

Let's discuss how search would be best implemented. I think the current solution is a bit limited

Member

nightwing commented Jul 14, 2013

I think this problems are fixed now.

@nightwing nightwing closed this Jul 14, 2013

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