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
3c27da49ac
fix: use stack-allocated array for SGR parameter parsing
...
Replace strings.Split with fixed [8]string array to avoid heap allocation.
| Metric | Before | After | Delta |
|------------|--------|-------|-------|
| allocs/op | 1 | 0 | -1 |
| B/op | 48-80 | 0 | -100% |
| ns/op | ~45 | ~20 | -55% |
2026-02-21 22:20:21 +09:00
Daisuke Maki
8c4db9e026
convert t.Errorf/t.Fatal to testify/require
2026-02-21 07:58:26 +09:00
Daisuke Maki
6d97fcaa0f
remove named return values from Dig and ToKey
2026-02-20 22:48:08 +09:00
Daisuke Maki
4f7978201b
guard GetList against empty KeyList
2026-02-20 22:27:04 +09:00
Daisuke Maki
0ccff01ddd
increase test coverage
2026-02-20 20:37:44 +09:00
Daisuke Maki
fc18c0d3de
Methodically add function comments
2026-02-20 10:55:49 +09:00
Daisuke Maki
8b74d9421a
standardize on using testify/require
2026-02-20 10:22:58 +09:00
Daisuke Maki
27cda7fc36
Remove dead prevInputTime field and fix "rest" typo
2026-02-18 15:56:19 +09:00
Daisuke Maki
66bf406024
Remove redundant err != nil in Windows syscall wrappers
2026-02-18 15:27:42 +09:00
Daisuke Maki
de2d3465cb
Remove no-op bitwise OR with zero in test
2026-02-18 14:40:17 +09:00
lestrrat
90f9c5ceca
Merge pull request #692 from peco/fix-ansi-parser-errors
...
Handle strconv.Atoi errors in ANSI SGR parser
2026-02-18 11:31:56 +09:00
Daisuke Maki
0b4f9d0adf
Handle strconv.Atoi errors in ANSI SGR parser
2026-02-18 11:25:30 +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
a1d7596b1a
Replace Termbox (name references) with Tcell
2026-02-16 23:50:19 +09:00
Daisuke Maki
91339e96f9
Do away with pkg/errors
2026-02-16 22:06:21 +09:00
Daisuke Maki
49f7153598
Add ANSI color support
2026-02-16 20:06:53 +09:00
lestrrat
4ed16af465
Merge pull request #581 from peco/fix-ctrl-shift-modifiers
...
Fix #529
2026-02-15 08:48:57 +09:00
Daisuke Maki
0ef5cdb83d
Fix #529
2026-02-15 08:44:21 +09:00
Daisuke Maki
3a7556f264
Fix #557
2026-02-15 08:14:33 +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
e9c5582ba1
Initial pass
2026-02-13 12:35:06 +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
61b5d22fb8
Move stuff around for better code organization
2016-12-14 11:00:22 +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
9ef1da7a71
Ah, finally realized that Input was looking at a stale version of peco.Keymap
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
Daisuke Maki
05ad9ca805
Use <^>v to represent ←↑→↓
2016-03-23 11:13:38 +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