lotabout / ideas

log for new ideas and the execution of ideas
1 stars 0 forks source link

fzf in rust #12

Closed lotabout closed 8 years ago

lotabout commented 8 years ago

FZF is a very handy tool to do fuzzy search. I would like to write one on my own with rust. The main purpose is to learn rust by practice.

lotabout commented 8 years ago

Use this issue as project management

TODOs:

lotabout commented 8 years ago

Now the problem is that the controller will save all items read before send the NewItem event to matcher. Meanwhile the matcher keeps going because no signal is received. And since the controller will need to lock the data of items and that lock is not released by matcher. Kind of deadlock here.


The comments below are Wrong...

About the block issue: the root cause is that every time a new query starts, fzf-rs will reset the item_pos to 0, thus will trigger for item in items[self.item_pos..].into_iter() {. In this case, it seems that [start..] will try to read all items instead of lazy.

So In this case, we should directly specify the bounds of the slice, i.e. [start..end]. Problem solved.

lotabout commented 8 years ago

Closing this because almost what I planned in the first place had been done. Check skim.