Daisuke Maki
57d6761a9f
Replace shouldLock with context-based re-entrancy
2026-02-18 11:25:42 +09:00
Daisuke Maki
46331edcfd
Check for far wider range of things in lint
2026-02-18 07:49:40 +09:00
Daisuke Maki
1bb115f22b
fix typo
2026-02-17 19:14:41 +09:00
lestrrat
6bce9be413
Merge pull request #656 from peco/fix-global-action-registry
...
Fix global action registry
2026-02-17 14:53:25 +09:00
Daisuke Maki
6037ac2ee5
Avoid action-at-a-distance when we don't need to
2026-02-17 14:44:49 +09:00
Daisuke Maki
28d7583555
Use saner struct key approach
2026-02-17 13:13:28 +09:00
Daisuke Maki
ffc3e85bd0
consolidate SendStatusMsg
2026-02-17 07:17:45 +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
e9c5582ba1
Initial pass
2026-02-13 12:35:06 +09:00
Daisuke Maki
43ee9051f8
Fix blocking issue cased by #491
...
... by punting the problem when the input is an infinite stream.
This commit fixes the blocking, but the subsequent queries don't seem
to be properly running
refs #494
2020-01-09 20:22:18 +09:00
lestrrat
5027605f27
Merge branch 'master' into master
2018-10-25 16:50:15 +09:00
Daisuke Maki
d02bb4122c
Workaround glide being stubborn wrt lestrrat/go-pdebug -> lestrrat-go/pdebug
2018-10-25 09:50:16 +09:00
Thomas Aynaud
281db7f5e3
Go fmt
2018-06-18 13:50:20 +02:00
Daisuke Maki
61b5d22fb8
Move stuff around for better code organization
2016-12-14 11:00:22 +09:00
Daisuke Maki
25d942b08b
Add notion of "top-level" actions
...
This is used to by-pass locking the hub.Batch operation when
we have nested action calls that use batching internally.
fixes #345
2016-09-30 18:20:25 +09:00
Daisuke Maki
c12cd97d29
Use pdebug instead of trace
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
e8c8ed19e7
Trying to untangle some of the mess
2016-06-18 17:39:02 +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
Daisuke Maki
7ee40fe3b0
Conditionally bake in debug code
2015-03-17 15:37:52 +09:00
Daisuke Maki
e8915c03cb
More refactoring for testing
2015-03-17 15:37:48 +09:00
Daisuke Maki
4594f2d26d
newMutex, sync.Locker
2014-10-14 16:44:33 +09:00
Daisuke Maki
4c078d6505
Fix a race condition that existed between clear status and print status
...
For whatever reason I was thinking at the time, I had split the channels
to receive request to print to and clear the status message. This
basically means that, even if you meant to print X and then clear it
in 500 milliseconds, the clear request could actually arrive BEFORE
the print message.
This change basically puts all the status related request into one
channel, so that all requests can come sequentially
2014-09-08 14:41:06 +09:00
Daisuke Maki
065ca648c4
This change show current key sequence being handled
2014-07-15 09:23:03 +09:00
Daisuke Maki
620e324c5e
golint
2014-07-12 16:41:30 +09:00
Daisuke Maki
7d3310fce5
Create combined actions.
...
This change still doesn't work, as data modification happens at
different goroutines and some things just don't make sense then
2014-07-11 14:39:31 +09:00
Daisuke Maki
9bbfaac77d
Various structural changes
...
* Compile ahocorosick matcher laizly
* Move key mappings to keyseq, as we do not directly interface them in
the main peco package
2014-07-06 18:39:24 +09:00
Daisuke Maki
9264c9fa7e
Remove global Keyseq, embed in Keymap
2014-07-05 22:29:34 +09:00
Daisuke Maki
8d84660f67
Start moving away from the old way of using the Keymap object
2014-07-05 21:47:14 +09:00
Daisuke Maki
8c3e629dad
Various
...
* Alt key mod now work again
* Use TrimSpace
* Remove some unused code (need to delete a LOT more)
2014-07-05 21:30:30 +09:00
Daisuke Maki
000b5fc607
Change rules for receiving key sequences
...
* Longest sequence always wins
* If you would like to break out of typing in a sequence, you must
call peco.Cancel
* The Konami command now needs to start with C-x
TODO: remove all that Keymap code that doesn't get used anymore
2014-07-05 18:22:42 +09:00
Daisuke Maki
11d9a209d9
Very crude hook-up of keymap to ahocorasick keyseq
2014-07-05 11:29:24 +09:00
Takashi Kokubun
85f8629311
Accept key sequence
2014-07-03 23:50:44 +09:00
Daisuke Maki
24554f1235
Document and rename stuff
2014-07-03 05:51:52 +09:00
Daisuke Maki
ca5cbb6fb1
Refactor keymap
...
Created Action/ActionFunc to wrap common operations
refs #121
2014-07-02 21:31:49 +09:00
Daisuke Maki
0eb4507877
change ExecQuery() to not take any parameters
...
ExecQuery() now just executes c.query if it's not an empty string
2014-07-01 08:47:46 +09:00
Daisuke Maki
1d02edb519
Very small refactoring
...
Rename stuff like Finish() which was confusing with action 'Finish'
2014-06-30 08:49:52 +09:00
negipo
8586fb84d9
Add also Esc
2014-06-29 19:32:11 +09:00
negipo
63df87b238
Use C-c for handleCancel
2014-06-29 19:12:30 +09:00
mattn
cfcd30edcd
Don't handle ModAlt if no M-XXX mappings
2014-06-25 09:50:30 +09:00
Daisuke Maki
2fb1468435
Kill unused var
2014-06-24 22:49:55 +09:00
Daisuke Maki
bdfced0609
Refactor #89
...
This is what I really meant to do. i.e.
type Keymap [2]map[termbox.Key]KeymapHandler
seemed too hard for the regular human being.
In this change it's
type Keymap [ModMax]RawKeymap
type RawKeymap map[termbox.Key]KeymapHandler
2014-06-24 22:41:46 +09:00
Syohei YOSHIDA
76ee53b552
Support Alt(Meta) key prefix
2014-06-24 14:06:20 +09:00
Daisuke Maki
124a994499
Merge branch 'master' into make-some-pizza
...
Conflicts:
ctx.go
keymap.go
matchers.go
2014-06-18 14:32:00 +09:00
Daisuke Maki
6f4e89e787
Implement -0 (--zero)
...
This makes peco accept lines with NUL(\0) characters.
Anything before the NUL is used as the string to be displayed
in the peco view AND used for matching.
Anything after the NUL is used as the output when peco is done
Should fix #76
2014-06-18 13:29:11 +09:00
Daisuke Maki
6426682e06
Make default binding ToggleSelectAndSelectNext
...
refs #74
2014-06-17 19:48:05 +09:00
Daisuke Maki
5930da410b
Allow removing a keymap
2014-06-17 19:47:36 +09:00