Commit graph

1230 commits

Author SHA1 Message Date
Daisuke Maki 5b1bc48a30 version++; this be v0.5.1 2017-03-17 12:41:58 +09:00
lestrrat 96cf88f129 Merge pull request #412 from peco/topic/pr-409-redux
Only calculate the column size when necessary
2017-03-17 12:17:35 +09:00
Daisuke Maki e8bef7854e Update Changes 2017-03-17 12:12:40 +09:00
lestrrat 73487ee4f0 Merge pull request #413 from k0kubun/pr-412-consider-width
Reduce right scroll limit with a screen width
2017-03-17 12:11:06 +09:00
Takashi Kokubun 405a729ac0 Reduce right scroll limit with a screen width
Column: 0 can show `width` columns.
Thus if lines have `num` columns, we should limit scroll to Column: `num - width`.

Otherwise screen is blacked out when we unlimitedly do ScrollRight.
2017-03-17 10:43:21 +09:00
Daisuke Maki 98936082f0 Only calculate the column size when necessary
This trims down the calculation required by #409 to only those lines
that will appear on screen, and still controls how far right we can
scroll to
2017-03-17 09:42:33 +09:00
lestrrat fa9f5d593a Merge pull request #411 from peco/topic/issue-410
Make Resume a blocking operation
2017-03-17 00:03:08 +09:00
Daisuke Maki 3308108729 Baaah, fix glide check while we're at it 2017-03-16 23:58:54 +09:00
Daisuke Maki 94a0271706 Update changes 2017-03-16 23:44:00 +09: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
lestrrat 91c93e2271 Merge pull request #408 from peco/topic/glide
Fix glide handling
2017-03-15 18:38:51 +09:00
Daisuke Maki ffc148bc9e fix glide path 2017-03-15 18:35:09 +09:00
Daisuke Maki ccdf75e101 Fix glide handling 2017-03-15 18:30:46 +09:00
lestrrat 138af2c22e Merge pull request #407 from peco/topic/build-arm
Build arm binaries, too
2017-03-15 18:21:17 +09:00
Daisuke Maki f92895fe26 Build arm binaries, too 2017-03-15 15:52:05 +09:00
lestrrat 873c8a3fbc Merge pull request #406 from peco/topic/tweaks
Topic/tweaks
2017-03-15 09:10:58 +09:00
Daisuke Maki aaa77cd3c8 remove unused structs and fields 2017-03-15 09:01:01 +09:00
Daisuke Maki 1e14eea871 make sure to use WithCancel (and be pedantic) 2017-03-15 09:01:01 +09:00
lestrrat 531849df65 Merge pull request #403 from peco/topic/env-exec
Add some environment variables
2017-03-15 09:00:14 +09:00
Daisuke Maki f3e9250486 Add some environment variables 2017-03-06 17:06:50 +09:00
lestrrat 439ea20938 Merge pull request #402 from peco/topic/remove-tty
Topic/remove tty
2017-03-06 17:02:55 +09:00
Daisuke Maki 924b1041c8 Update Changes 2017-03-06 09:50:58 +09:00
Daisuke Maki c37f3a3ae8 Remove tty, as previously noted 2017-03-06 09:42:26 +09:00
lestrrat 5a94918fad Merge pull request #400 from peco/topic/v0.5.0
version++; this be v0.5.0
2017-03-06 09:03:36 +09:00
Daisuke Maki 8e70ee0072 version++; this be v0.5.0 2017-03-06 08:56:25 +09:00
lestrrat 97cf18213c Merge pull request #399 from peco/topic/timing
Tweak timing for when to initialize the screen and other components
2017-03-04 15:06:50 +09:00
Daisuke Maki ab72a5521f Tweak timing for when to initialize the screen and other components
We should wait to initialize the screen until we have something
coming in from the source: otherwise multiple peograms chained via
pipes would compete for the same terminal resource, and things may
go southward.

But then there are components that rely on the screen being intialized,
so we let them wait as well.
2017-03-03 23:23:07 +09:00
lestrrat 766fdd73c0 Merge pull request #394 from peco/topic/command
[WIP] Remove ExecuteCommand, and add --exec
2017-03-03 20:28:31 +09:00
Daisuke Maki b3e1903818 Update changes 2017-03-03 16:22:09 +09:00
Daisuke Maki ab74eda9e5 Update Changes 2017-03-03 16:20:32 +09:00
Daisuke Maki 2abd71514d Update README 2017-03-03 16:18:33 +09:00
Daisuke Maki 2aafac08c1 remove debug statement 2017-03-03 16:14:00 +09:00
Daisuke Maki 75d0d54da6 Fix test 2017-03-03 15:52:42 +09:00
Daisuke Maki 20fe945b21 add shell 2017-03-03 15:48:28 +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
Daisuke Maki eb3dcf5306 fix README 2017-03-03 15:04:46 +09:00
Daisuke Maki e670560421 Change ExecuteCommand in a non-backcompatible way
Data is channeled through Stdin of the command, so we
don't do any silly interpolation
2017-03-03 15:03:11 +09:00
Daisuke Maki 482fa7fc6d Change default scan buffer size to 256kb
...and make it configurable
2017-03-03 14:21:38 +09:00
Daisuke Maki a78051dcbe Properly suspend termbox before executing external command
This makes sure that termbox does not inadvertantly steal our
commands while executing external commands, and also makes sure
we explicitly reset the screen.

Also, make sure we use a temporary selection.
2017-03-03 13:53:41 +09:00
lestrrat ecd2b35aff Merge pull request #392 from peco/topic/v0.4.9
version++; this be v0.4.9
2017-03-01 10:34:01 +09:00
Daisuke Maki 936910b202 version++; this be v0.4.9 2017-03-01 06:51:48 +09:00
Daisuke Maki 3022ba26ed Update Changes 2017-03-01 06:45:20 +09:00
lestrrat ee8ffa11bb Merge pull request #391 from peco/topic/issue-388
remove unnecessary check for selectionPrefix
2017-03-01 06:44:10 +09:00
Daisuke Maki bc7e5ea1f6 remove unnecessary check for selectionPrefix 2017-02-28 23:30:06 +09:00
lestrrat ed63779ea9 Merge pull request #390 from peco/topic/issue-389
Resume reading from source when we are done reading
2017-02-28 23:26:15 +09:00
Daisuke Maki 5a83582996 Update changes 2017-02-28 23:17:39 +09:00
Daisuke Maki c59137c2bd Resume reading from source when we are done reading
In order to serve the user filtered results as fast as possible,
we start reading from Source as soon as we have acquired a few lines
from STDIN or file.

So in case of #389, we started to process the source while we
are still reading from STDIN. But that means our buffer is not
quite ready with all of the input from STDIN.

Meanwhile, the filtering thinks it's done when we reach end of input
mark prematurely, and it never resumed reading. This is why we have
less lines than we should.

Now, in order to fix this, we need to process as much as we have, and
then come back to see if we have more. We do this by looping until
the setupDone channel is closed, and we have exhaused our buffer.

This fixes #389, but it also shows that the processing is a little
different when we run the filter for the first, and subsuquent
executions. Apparently the next execution takes a little bit longer
to *draw* (note: I have not checked if it's the filtering that's slow,
or that simply if the draw timings are off)
2017-02-28 23:09:36 +09:00
lestrrat ddec47bd0b Merge pull request #387 from peco/topic/v0.4.8
version++; this be v0.4.8
2017-02-27 12:07:25 +09:00
Daisuke Maki 8866cff58d version++; this be v0.4.8 2017-02-27 12:01:56 +09:00
lestrrat ce93a80fde Merge pull request #386 from peco/topic/go1.8
Use go 1.8
2017-02-27 11:52:11 +09:00