Commit Graph

53 Commits (22cbd9fa58512ffdcc975bab37a55467d5e10968)

Author SHA1 Message Date
Junegunn Choi 22cbd9fa58
Implement height range (--height ~[VALUE][%])
Close #2953
2 years ago
Junegunn Choi 731daf0f37
Fix tcell renderer
Fix #2954
2 years ago
Emil Vanherp 4bef330ce1
Add support for ANSI strike-through (#2932)
Close #2932

Co-authored-by: Emil Vanherp <emil@vanherp.me>
2 years ago
Junegunn Choi b88eb72ac2
Modernize build tags 2 years ago
Vlastimil Ovčáčík b8aa2d2c32 Minor refactoring tcell library from tui.go to tcell.go
To prevent including tcell library in non-windows builds.
3 years ago
Vlastimil Ovčáčík 0ff885461b Add mouse support to the FullscreenRenderer 3 years ago
Vlastimil Ovčáčík ca43f95fb1 Fix Backspace key to emit BSpace and AltBS events instead of CtrlH
CtrlH events are still sent when appropriate. I have adjusted
FullscreenRenderer to match the LightRenderer's behaviour, which seems
to be correct.
3 years ago
Vlastimil Ovčáčík 09700f676b Add CtrlCaret keyboard event to FullscreenRenderer 3 years ago
Vlastimil Ovčáčík 4271e9cffa Fix Ctrl+Space key combination to emit CtrlSpace instead of Rune ' ' 3 years ago
Vlastimil Ovčáčík f3dc8a10d5 Add ability to type AltGr characters in FullscreenRenderer on Windows. 3 years ago
Vlastimil Ovčáčík 00fb486f6a [tests] Add testing of keyboard events in FullscreenRenderer.GetChar()
This contains one test case of each tcell.Key* event type that can be
sent to and subsequently processed in fzf's GetChar(). The test cases
describe status quo, and all of them PASS.

Small function util.ToTty() was added. It is similar to util.IsTty(),
but for stdout (hence the To preposition).
3 years ago
Vlastimil Ovčáčík f4f47f5fe3 Minor changes
- obsolete todo removed, I tested the ev.ch for " " char and it works just
fine
3 years ago
Junegunn Choi 3f75a8369f
Replace RuneWidth to StringWidth to handle grapheme clusters
Fix #2482
3 years ago
Junegunn Choi 7f8e0dbc40
Extend support for alt key chords
"alt-" with any case-sensitive character is allowed
3 years ago
Junegunn Choi 3fe8eeedc5
Fix handling of arrow keys with alt and/or shift modifier
Fix #2254

- Properly handle extra chars in the buffer. Patch suggested by @mckelly2833.
- Support alt-arrow sequences in \e[1;3A format
- Support shift-alt-arrow sequences in \e[1;10A format
4 years ago
Junegunn Choi f8aaeef218
Revert "Prefer LightRenderer on Windows if it's available"
This reverts commit 7915e365b3
due to https://github.com/junegunn/fzf.vim/issues/1152#issuecomment-719696495.
4 years ago
Junegunn Choi 7915e365b3
Prefer LightRenderer on Windows if it's available
Fix #1766
4 years ago
Junegunn Choi 2e8e63fb0b
Add more --border options
Instead of drawing the window border in Vim using an extra window,
extend the --border option so that we do can it natively.

Close #2223
Fix #2184
4 years ago
Junegunn Choi 9b946f2b7a
Fix preview window of tcell renderer 4 years ago
Junegunn Choi 11841f688b
Add support for text styling using --color
Close #1663
4 years ago
Junegunn Choi faf68dbc5c
Implement streaming preview window (#2215)
Fix #2212

    # Will start rendering after 200ms, update every 100ms
    fzf --preview 'for i in $(seq 100); do echo $i; sleep 0.01; done'

    # Should print "Loading .." message after 500ms
    fzf --preview 'sleep 1; for i in $(seq 100); do echo $i; sleep 0.01; done'

    # The first line should appear after 200ms
    fzf --preview 'date; sleep 2; date'

    # Should not render before enough lines for the scroll offset are ready
    rg --line-number --no-heading --color=always ^ |
      fzf --delimiter : --ansi --preview-window '+{2}-/2' \
          --preview 'sleep 1; bat --style=numbers --color=always --pager=never --highlight-line={2} {1}'
4 years ago
Junegunn Choi 97a725fbd0
Do not disable mouse after execute(-silent) when --height option is used
The action takes place in the alternate screen so the offsets should
still be correct.
4 years ago
Junegunn Choi d9b1211191
Add more --border options; default changed to "rounded"
--border option now takes an optional argument that defines the style

  - rounded (new default)
  - sharp
  - horizontal (previous default)
4 years ago
Junegunn Choi dca56da0ef
Add 'insert' key for --bind
Close #1744
4 years ago
Junegunn Choi 3db6b88d82
Add preview-fg and preview-bg for --color
Close #1776
4 years ago
Junegunn Choi 168453da71
More key chords for --bind
Close #1752
5 years ago
Junegunn Choi 75972d59a8
Add --no-unicode option to draw borders in ASCII characters
Close ##1533
5 years ago
Junegunn Choi 27c40dc6b0
Restore STDIN during execute-silent
This allows users to terminate the process with CTRL-C when it hangs.
6 years ago
Junegunn Choi 7dbbbef51a
Add support for alt-{up,down,left,right} keys
Close #1234
6 years ago
Junegunn Choi b3b101a89c
Support binding of left-click and right-click
left-click and right-click are respectively bound to "ignore" and
"toggle" (after implicitly moving the cursor) by default.

Close #1130
7 years ago
Junegunn Choi e1582b8323
Clean up renderer code
Remove code that is no longer relevant after the removal of ncurses
renderer. This commit also fixes background color issue on tcell-based
FullscreenRenderer (Windows).
7 years ago
Junegunn Choi bc9d2abdb6
Improve preview window rendering
- Fix incorrect display of the last line when more than a line is
  wrapped above
- Avoid unnecessary flickering of the window
7 years ago
Junegunn Choi ca0b3b6fd7
Fixes for Cygwin
- Update install script to download Windows binary if $TERM == cygwin
- Unset TERM if $TERM == cygwin (#933)
- Always use cmd.exe instead of $SHELL when running commands
7 years ago
Edgar Lee 7d3575b362
Use glide to handle go dependencies 7 years ago
Junegunn Choi d34e4cf698
Support CTRL-Z (SIGSTOP) 7 years ago
Junegunn Choi 6b592137b9
Add support for ctrl-alt-[a-z] key chords
Close #906
7 years ago
Junegunn Choi 4b700192c1
Add --border option to draw horizontal lines above and below the finder
Goes well with --height
7 years ago
Junegunn Choi 36dceecd58
Add support for ctrl-space key
Close #825
7 years ago
Junegunn Choi ff248d566d
Drop ncurses dependency
Close #818
7 years ago
Junegunn Choi ede7bfb901
Optimize LightRenderer for slow terminals 7 years ago
Junegunn Choi d64828ce6d
Print error message to stderr on unexpected exit 7 years ago
Junegunn Choi 9977a3e9fc
Make preview renderer suspend early on line wrap 7 years ago
Junegunn Choi 996dcb14a3
Make fzf immediately quit when failed to read /dev/tty
Close #798
7 years ago
Junegunn Choi 1448d631a7
Add --height option 7 years ago
Junegunn Choi a442fe0fd0
Truncate long lines in preview window
Add `:wrap` to --preview-window to wrap lines instead

Close #756
8 years ago
Junegunn Choi de1c6b8727
[tcell] 24-bit color support
TAGS=tcell make install

    printf "\x1b[38;2;100;200;250mTRUECOLOR\x1b[m\n" |
        TERM=xterm-truecolor fzf --ansi
8 years ago
Junegunn Choi 182a6d99fd
[ncurses6] Support italics 8 years ago
Junegunn Choi 8524ea7441
Do not ignore resize event from ncurses and tcell 8 years ago
Junegunn Choi 8c661d4e8c
Revamp escape sequence processing for WSL
Also add support for alt-[0-9] and f1[12]
8 years ago
Junegunn Choi 4b332d831e
Add --no-bold option 8 years ago