Daisuke Maki
4b1dfa1c4d
fix: fast-path StripANSISequence to skip regexp when no ESC byte
...
Benchmark (10k lines):
plain text: 1023us -> 37us (-96%), 1.7MiB -> 0B (-100%), 30k -> 0 allocs
95% plain: 1064us -> 162us (-85%), 1720KiB -> 63KiB (-96%), 30.5k -> 2k allocs
2026-02-22 00:26:02 +09:00
Daisuke Maki
7588d33015
fix: eliminate closure allocation in fuzzy filter
...
Replace strings.IndexFunc with closure with direct CaseInsensitiveIndex.
| Metric | Before | After | Delta |
|------------|---------|---------|--------|
| allocs/op | 3018 | 2018 | -1000 |
| B/op | 123016 | 107014 | -16002 |
| ns/op | ~113k | ~88k | -22% |
2026-02-21 22:25:06 +09:00
Daisuke Maki
fc18c0d3de
Methodically add function comments
2026-02-20 10:55:49 +09:00
Daisuke Maki
66bf406024
Remove redundant err != nil in Windows syscall wrappers
2026-02-18 15:27:42 +09:00
Daisuke Maki
e1c62ab701
style, minor tweaks
2026-02-18 09:46:54 +09:00
Daisuke Maki
c877ae72d9
appease linter
2026-02-18 08:30:04 +09:00
Daisuke Maki
46331edcfd
Check for far wider range of things in lint
2026-02-18 07:49:40 +09:00
Daisuke Maki
4c439c71a8
Add test coverage
2026-02-17 07:00:32 +09:00
Daisuke Maki
91339e96f9
Do away with pkg/errors
2026-02-16 22:06:21 +09:00
Yasuhiro Matsumoto
c1ffd8b128
go fmt ./...
2026-02-14 17:36:53 +09:00
Daisuke Maki
db63d9f380
Add linting fixes
2026-02-14 07:48:23 +09:00
Daisuke Maki
20fe945b21
add shell
2017-03-03 15:48:28 +09:00
Daisuke Maki
c7f40e4346
surpress error message when user canceled
2017-02-10 07:06:34 +09:00
Daisuke Maki
45398301ea
Apply mattn's review
2016-12-13 10:06:12 +09:00
Daisuke Maki
668a498ed8
slight refactor
2016-12-13 07:21:51 +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
8d89338eb2
Fix Ignorable error detection/test
2016-06-23 02:24:29 -04:00
Daisuke Maki
b85690181f
oops
2016-06-18 17:40:33 +09:00
Daisuke Maki
bf161fb19a
Make it possible to swap a buffer instead of os.Stdout
2016-06-18 17:40:33 +09:00
Daisuke Maki
39eb717c6e
Wrap errors
2016-06-18 17:40:33 +09:00
Daisuke Maki
e3c36875fa
eradicate fmt.Errorf
2016-06-18 17:40:33 +09:00
Daisuke Maki
95c840dcb0
argh, forgot to fix package name
2015-09-28 22:27:55 +09: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