Commit Graph

13 Commits (master)

Author SHA1 Message Date
Junegunn Choi 86d92c17c4
Refactor tui.TtyIn() 3 weeks ago
Junegunn Choi c4cc7891b4
Revert "Close handles to /dev/tty", instead reuse handles 3 weeks ago
Junegunn Choi 218843b9f1
Close handles to /dev/tty 3 weeks ago
Junegunn Choi d274d093af
Render UI directly to /dev/tty
See https://github.com/junegunn/fzf/discussions/3792

This allows us to separately capture the standard error from fzf and its
child processes, and there's less chance of user errors of redirecting
the error stream and hiding fzf.
3 weeks ago
Junegunn Choi e8405f40fe
Refactor the code so that fzf can be used as a library (#3769) 4 weeks ago
Charlie Vieth 3c877c504b
Enable profiling options when 'pprof' tag is set (#2813)
This commit enables cpu, mem, block, and mutex profling of the FZF
executable. To support flushing the profiles at program exit it adds
util.AtExit to register "at exit" functions and mandates that util.Exit
is used instead of os.Exit to stop the program.

Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
2 months ago
Junegunn Choi d02b9442a5
(Experimental) Improve Sixel graphics support (#2544)
Progress:

* Sixel image can now be displayed with other text, and is scrollable
* If an image can't be displayed entirely due to the scroll offset, fzf
  will render a wireframe to indicate that an image should be displayed
* Renamed $FZF_PREVIEW_{WIDTH,HEIGHT} to $FZF_PREVIEW_PIXEL_{WIDTH,HEIGHT}
  for clarity
* Added bin/fzf-preview.sh script to demonstrate how to display an image
  using Kitty or Sixel protocol

An example:

  ls *.jpg | fzf --preview='seq $((FZF_PREVIEW_LINES*9/10)); fzf-preview.sh {}; seq 100'

A known issue:

* If you reduce the size of the preview window, the image may extend
  beyond the preview window
7 months ago
Junegunn Choi bac385b59c
Simplify LightRenderer.Size() 7 months ago
Junegunn Choi b1a0ab8086
Experimental Sixel support (#2544) 7 months ago
Junegunn Choi b88eb72ac2
Modernize build tags 2 years ago
Mitsuo Heijo 2e353aee96
Replace golang.org/x/crypto/ssh/terminal with golang.org/x/term (#2395)
See https://github.com/golang/go/issues/31044
3 years ago
Michael Kelley ae15eda546
Add truecolor support for Windows, if available (#2156)
- Update to latest tcell which has 24 bit Windows support
- light renderer under Windows defaults to Dark256, if possible
- Respect TCELL_TRUECOLOR
- Remove tcell 1.3 references
4 years ago
Michael Kelley 7d5985baf9
Make height option work under Windows (#1341)
Separate Unix & Windows code into platform specific files for light renderer
4 years ago