Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Live buffer search - #113

Merged
benogle merged 3 commits into
masterfrom
bo-live-buffer-search
Jan 3, 2014
Merged

benogle merged 3 commits into
masterfrom
bo-live-buffer-search

Conversation

@benogle

@benogle benogle commented Dec 20, 2013

Copy link
Copy Markdown
Contributor

To go along with #112, buffers should be live-searchable.

  • It will not live search on 1 character in the find editor. Maybe it should be 2 chars?

I'd like to have someone else try this out on their machine with a large file. Or we can just merge it, then pull it out if it's too slow.

Fixes #11

@ghost ghost assigned benogle Dec 21, 2013
Comment thread lib/find-view.coffee Outdated

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Instead of checking for length > 1, it might be better to use _.debounce. This would only invoke the live search after X milliseconds have passed, so in most cases it would never search for a one letter pattern.

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.

I dont want it to inadvertently search for a space or an 'e' or something. We can debounce too, though.

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.

After messing with this: the buffer contents modified is already debounced. It feels really slow with any more of a delay.

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.

I would be willing to remove the pattern check. If it's terribly slow, we can add it back in.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Whoops, I forgot contents-modified was debounced. I think it is fine the way it is now... sorry for the trouble!

benogle added a commit that referenced this pull request Jan 3, 2014
@benogle
benogle merged commit 07624fd into master Jan 3, 2014
@kevinsawicki
kevinsawicki deleted the bo-live-buffer-search branch January 10, 2014 17:28
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.

Auto search while typing rather than hitting enter to search

2 participants