Commit graph

163 commits

Author SHA1 Message Date
Daisuke Maki 515e13fbf3 Propagate screen Init error on resume 2026-02-18 09:30:05 +09:00
Daisuke Maki 46331edcfd Check for far wider range of things in lint 2026-02-18 07:49:40 +09:00
lestrrat ce6dac6800
Merge pull request #670 from peco/fix-viewarround-typo
Fix typo
2026-02-17 19:30:46 +09:00
Daisuke Maki ec9ebb4f02 Fix typo 2026-02-17 19:22:00 +09:00
Daisuke Maki bb004da328 avoid possibility of selection.Remove(nil) 2026-02-17 18:51:03 +09:00
lestrrat 7907224eda
Merge pull request #654 from peco/refactor-peco-god-object
Refactor Peco object
2026-02-17 13:46:52 +09:00
Daisuke Maki 4e0f004cb3 refactor frozen state 2026-02-17 13:28:21 +09:00
Daisuke Maki a813e7198e Refactor ZoomState 2026-02-17 13:25:21 +09:00
Daisuke Maki 24df34ddda refactor single key jump into its own state object 2026-02-17 13:20:10 +09:00
Daisuke Maki 28d7583555 Use saner struct key approach 2026-02-17 13:13:28 +09:00
Daisuke Maki 02f7140f27 properly propagate ctx 2026-02-17 10:17:26 +09:00
Daisuke Maki 27c8f08bea Simplify Action interface 2026-02-17 07:28:31 +09:00
lestrrat 79bc52f006
Merge pull request #635 from peco/split-messagehub
consolidate SendStatusMsg
2026-02-17 07:20:05 +09:00
Daisuke Maki ffc3e85bd0 consolidate SendStatusMsg 2026-02-17 07:17:45 +09:00
Daisuke Maki cd26822d4c refactor query -> exec draw 2026-02-17 07:08:20 +09:00
Daisuke Maki 4cd07c8dd3 Refactor paging related actions 2026-02-17 00:04:51 +09:00
Daisuke Maki 3a85ae62e0 refactor batchAction 2026-02-16 22:52:18 +09:00
lestrrat b152854e6c
Merge pull request #616 from peco/dedup-freeze-unfreeze
slight refactor around freeze/unfreeze
2026-02-16 22:44:15 +09:00
Daisuke Maki 19f9bd1be9 slight refactor around freeze/unfreeze 2026-02-16 22:41:44 +09:00
Daisuke Maki 12a55491ef Change Hub structure to take typed payloads 2026-02-16 22:40:34 +09:00
lestrrat 53a69a609f
Merge pull request #614 from peco/dedup-selection-nav
refactor navigation code
2026-02-16 22:36:21 +09:00
Daisuke Maki d40ea73946 refactor navigation code 2026-02-16 22:32:25 +09:00
Daisuke Maki 952884009c Use types for OnCancel values 2026-02-16 22:17:35 +09:00
Daisuke Maki 91339e96f9 Do away with pkg/errors 2026-02-16 22:06:21 +09:00
lestrrat 6de9f7e58f
Merge pull request #607 from peco/fix-resume-deadlock
Remove the possibility of Resume() deadlocking
2026-02-16 21:42:52 +09:00
Daisuke Maki 8710f98b1f Remove the possibility of Resume() deadlocking 2026-02-16 21:35:56 +09:00
Daisuke Maki d691144f96 Create MarkComplete() method to avoid future us from deadlocking 2026-02-16 21:26:27 +09:00
Daisuke Maki d4ef70813f Implement zoom in/out 2026-02-16 19:49:49 +09:00
Daisuke Maki 68d17afc7c Implement freeze/unfreeze 2026-02-16 15:43:38 +09:00
Daisuke Maki 4f1d149ceb Add new layout, refactr layout lookup/registration 2026-02-16 15:05:01 +09:00
Daisuke Maki a35076da6f Fix #455 2026-02-15 18:13:54 +09:00
Daisuke Maki aa1335ff70 fix #428 2026-02-15 14:07:29 +09:00
Daisuke Maki f2c6c895b8 Fix bindings, fix #575 2026-02-15 07:46:14 +09:00
Daisuke Maki 0fb46c5d1e Fix #574 2026-02-15 07:37:26 +09:00
Yasuhiro Matsumoto 0d84ed1846
Remove leading tab from doGoToPreviousSelection function name 2026-02-14 17:37:13 +09:00
Yasuhiro Matsumoto c1ffd8b128
go fmt ./... 2026-02-14 17:36:53 +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
Daisuke Maki 4ad576bc6e Properly execute selectOneAndExit logic when an initial query is specified 2020-01-01 15:27:28 +09:00
鈴木康文 6d1bce6bce action : fix typo 2019-03-15 09:44:04 +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 601a7c7adc Add goToPreviousSelection 2018-06-22 15:17:31 +02:00
Thomas Aynaud 1cb1b137ac Add doGoToNextSelection action 2018-06-22 15:17:22 +02:00
Thomas Aynaud 90b5fa5d1c Add doToggleViewArround
Reset the query but do not move. This allows to select a line using peco
filters and view around, for instance for a log analysis
2018-06-22 15:16:25 +02:00
Daisuke Maki d213c89cab Rename to Top -> FirstItem, Bottom -> LastItem 2017-12-27 07:14:11 +09:00
Anders Eurenius 3058ce77f4 Add scroll to top and bottom 2017-12-26 15:28:00 +01:00
Daisuke Maki 8069f8eb2f Make Resume a blocking operation
This is required because we need to make sure we know termbox
has been initialized before attempting to make another drawing
operation.

Notably, without proper termbox initialization, screen.Size() returns a
bogus value, and we miss the line location where we left off to execute
the external command specified by --exec
2017-03-16 23:16:12 +09:00
Daisuke Maki f3e9250486 Add some environment variables 2017-03-06 17:06:50 +09:00
Daisuke Maki 8ca4f61967 Remove ExecuteCommand, hello --exec
--exec is a new, and far better tool to execute external commands
from peco results. It is invoked when `Finish` action is called,
and pipes selected line(s) to the specified command. If there were
saved lines, every saved line plus the currently selected line is
piped to the command. Otherwise, only the currently selected line
is piped.

When the command exits, execution goes back to peco, where you can
keep doing incremental searches, and again execute external commands.

When you are done, you are expected to exit out of peco using
the `Cancel` action
2017-03-03 15:40:09 +09:00