Daisuke Maki
821af182ab
reinstate single key jump
...
the caching was more agressive than before, and we forgot to
initialize the structure correctly
TODO: Write tests to catch this
fixes #331
2016-08-22 17:56:32 +09:00
Syohei YOSHIDA
aa4065aa62
Clone idgen field too
2016-08-21 02:32:19 +09:00
Daisuke Maki
87b4ad48a0
fix to work with new pipeline
2016-08-18 11:04:40 +09:00
Daisuke Maki
f578cfc850
Various tweaks to remove locking and interdependency
...
* Source does not depend on MemoryBuffer
* Remove a bunch of mutexes
* Change them to RWMutex where applicable
2016-07-02 16:19:17 +09:00
Daisuke Maki
497573e89a
The "filter" itself does not need locking, just the regexp compilation
2016-07-01 16:45:08 +09:00
Daisuke Maki
7f70d73996
pass the id generator instead of state
2016-07-01 15:26:56 +09:00
Daisuke Maki
07a22aa466
refactor idgen so that it exits gracefully
2016-07-01 14:13:27 +09:00
Daisuke Maki
d8e5bcb349
Move handling collecting results out of the context
...
This avoids possibly running a race condition during doFinish,
as doFinish onyl notifies that we're exiting now. Collecting the
data is now handled in the main function, after all of the
sub-goroutines are done.
fixes #321 (but only for peco > 0.3.6)
2016-07-01 13:19:02 +09:00
Daisuke Maki
ae98d7825d
cleanup some code
2016-06-30 12:59:57 +09:00
Daisuke Maki
3b98bf9bde
protect regexpfilter, one more filter set
2016-06-23 05:07:42 -04:00
Daisuke Maki
ca7a273d98
protect filterset race
2016-06-23 04:14:44 -04:00
Daisuke Maki
f09391251d
comments + gofmt
2016-06-21 23:25:14 -04:00
Daisuke Maki
68e614ed53
Make sure to reset the state source
2016-06-21 16:02:59 -04:00
Daisuke Maki
b8d45ca2fd
Draw while waiting
2016-06-21 15:41:24 -04:00
Daisuke Maki
7e18037f43
pass the buffers via channels so that we get to wait
2016-06-21 15:33:52 -04:00
Daisuke Maki
c048ef4d03
tweak
2016-06-21 11:49:35 -04:00
Daisuke Maki
b04024c411
Tweak draw timing, and buffer
2016-06-21 08:30:14 -04:00
Daisuke Maki
614cf1691b
properly use the default buffer threshold
2016-06-20 08:03:10 -04:00
Daisuke Maki
b5490a0982
listen to the correct channel
2016-06-20 20:26:50 +09:00
Daisuke Maki
7e0d5599d8
Send one more Draw() call after filtering is done
2016-06-18 17:40:33 +09:00
Daisuke Maki
c12cd97d29
Use pdebug instead of trace
2016-06-18 17:40:33 +09:00
Daisuke Maki
39eb717c6e
Wrap errors
2016-06-18 17:40:33 +09:00
Daisuke Maki
37e85afcd4
Remove unused code
2016-06-18 17:40:33 +09:00
Daisuke Maki
c24f6f0fe0
Remove unused code/types
...
note: ExternalCmdFilter should be re-checked
2016-06-18 17:40:33 +09:00
Daisuke Maki
3c615080ba
Cleanup some code
2016-06-18 17:40:33 +09:00
Daisuke Maki
83bffcdc5f
use SetQuery
2016-06-18 17:40:33 +09:00
Daisuke Maki
77099ef426
collect results from selection buffer
2016-06-18 17:40:33 +09:00
Daisuke Maki
d996d054ca
starting to plugin the new pipeline stuff
2016-06-18 17:40:33 +09:00
Daisuke Maki
406cfe3bd7
Trying to get rid of "everything is a Ctx"
2016-06-18 17:39:02 +09:00
Damian Gryski
e0f624c537
fix bug in byMatchStart.Less()
...
Foud by https://github.com/dominikh/go-staticcheck
filter.go:84:10: identical expressions on the left and right side of the '<' operator
2016-06-18 00:18:03 +02:00
Daisuke Maki
586c36a0e7
Let us being the great refactor
...
* Move internal stuff to internal
* Properly use conditional compilation to detect Windows
* Move type declarations to one location (except for a few places still)
2015-09-28 21:39:43 +09:00
Daisuke Maki
5beaeb6328
Only do the page re-calculation if we have a running query
...
refs #260
2015-09-28 16:52:08 +09:00
Daisuke Maki
03e0c99432
Implement BackToInitialFilter
...
fixes #252
It is by default NOT mapped to any key.
2015-07-11 16:58:01 +09:00
Syohei YOSHIDA
7f54c7fc0a
Fix Regexp filter issue
...
- Register 'Regexp' filter
- Set initial values of RegexpFilter
2015-03-23 23:49:26 +09:00
Daisuke Maki
26c92bb01b
Fix cancelation
2015-03-18 18:43:40 +09:00
Daisuke Maki
e9da5a7cfe
Replace $QUERY like how the document says
...
Also, if Args is omitted, a default value of []string{"$QUERY"} will be
used
2015-03-17 15:37:53 +09:00
Daisuke Maki
64fc4d12fd
some linting
2015-03-17 15:37:53 +09:00
Daisuke Maki
7ee40fe3b0
Conditionally bake in debug code
2015-03-17 15:37:52 +09:00
Daisuke Maki
3b8334eb52
Me so stupid. Thanks to @nobeans
2015-03-17 15:37:51 +09:00
Daisuke Maki
b848c6c0a2
Implement sticky selection
...
By default this feature is disabled, keeping backward compatibiity.
This should fix #230
2015-03-17 15:37:51 +09:00
Daisuke Maki
521df7fa01
Re-instate the missing order/dedupe matches bit
2015-03-17 15:37:51 +09:00
Daisuke Maki
b40b377813
Reinstate enableSep for custom filter
2015-03-17 15:37:50 +09:00
Daisuke Maki
737bf68f7f
Remove unused method Filter()
2015-03-17 15:37:50 +09:00
Daisuke Maki
4ec0f93f81
Rename struct for something more fitting
2015-03-17 15:37:50 +09:00
Daisuke Maki
fe5ae10e94
Sayonara matchers
2015-03-17 15:37:49 +09:00
Daisuke Maki
f323966c77
Implement custom matcher using the new streaming filter
2015-03-17 15:37:49 +09:00
Daisuke Maki
9178b578fa
Re-enable hilighting
2015-03-17 15:37:49 +09:00
Daisuke Maki
8518eeb8db
Add SmartCaseFilter
2015-03-17 15:37:49 +09:00
Daisuke Maki
4157d44a0f
Fire status msg clearing at the correct timing
2015-03-17 15:37:49 +09:00
Daisuke Maki
b6faf2db28
rename and move
2015-03-17 15:37:49 +09:00