summaryrefslogtreecommitdiffstats
path: root/src/tui
AgeCommit message (Collapse)Author
2021-05-14Replace RuneWidth to StringWidth to handle grapheme clustersJunegunn Choi
Fix #2482
2021-04-06Apply preview-bg color to preview border of all shapesJunegunn Choi
2021-04-04Ensure proper ESC seq handling under Windows preview mode (#2430)Michael Kelley
- Increase go routine buffer size - Add time wait for nonblock getchr() - Resolve #2429
2021-03-25Automatically set /dev/tty as STDIN on execute actionJunegunn Choi
https://github.com/junegunn/fzf/issues/1360#issuecomment-788178140 # Redirect /dev/tty to suppress "Vim: Warning: Input is not from a terminal" ls | fzf --bind "enter:execute(vim {} < /dev/tty)" # With this change, we can omit "< /dev/tty" part ls | fzf --bind "enter:execute(vim {})"
2021-03-20Replace golang.org/x/crypto/ssh/terminal with golang.org/x/term (#2395)Mitsuo Heijo
See https://github.com/golang/go/issues/31044
2021-03-12Fix regression in preview window renderingJunegunn Choi
2021-03-12Fix truncation of colored line when --preview-window wrap is setJunegunn Choi
Fix #2346
2021-01-03Make search toggleableJunegunn Choi
- `--phony` renamed to `--disabled` for consistency - `--no-phony` is now `--enabled` - Added `enable-search`, `disable-search`, and `toggle-search` actions for `--bind` - Added `--color` options: `query` and `disabled` Close #2303
2020-12-30Extend support for alt key chordsJunegunn Choi
"alt-" with any case-sensitive character is allowed
2020-12-04Change how hl:-1 or hl+:-1 is applied to text with background colorJunegunn Choi
2020-11-25Support ANSI code for clearing the rest of the line (ESC[0K)Junegunn Choi
Some programs use it to set the background color for the whole line. fzf --preview "printf 'normal \x1b[42mgreen\x1b[0K \x1b[43myellow\x1b[m\nnormal again'" fzf --preview 'delta <(echo foo) <(echo bar) < /dev/tty' Fix #2249
2020-11-24Fix handling of arrow keys with alt and/or shift modifierJunegunn Choi
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
2020-11-03Use default bg color when fg is set to -1 with reverse attributeJunegunn Choi
2020-10-31Revert "Prefer LightRenderer on Windows if it's available"Junegunn Choi
This reverts commit 7915e365b364af4c4287e35f4697f6e3cfe33284 due to https://github.com/junegunn/fzf.vim/issues/1152#issuecomment-719696495.
2020-10-31Prefer LightRenderer on Windows if it's availableJunegunn Choi
Fix #1766
2020-10-26Add more --border optionsJunegunn Choi
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
2020-10-25Fix preview window of tcell rendererJunegunn Choi
2020-10-25Add support for text styling using --colorJunegunn Choi
Close #1663
2020-10-23Do not assume that each character takes at least 1 columnJunegunn Choi
Fixes #2163, though this is not a proper fix to the problem.
2020-10-18Implement streaming preview window (#2215)Junegunn Choi
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}'
2020-09-02Add truecolor support for Windows, if available (#2156)Michael Kelley
- 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
2020-07-03Ignore cursor position reportJunegunn Choi
Close #2081
2020-07-03Use rune characters instaed of numbers in codeJunegunn Choi
2020-06-07Add backward-eof event for --bindJunegunn Choi
2020-05-18Do not disable mouse after execute(-silent) when --height option is usedJunegunn Choi
The action takes place in the alternate screen so the offsets should still be correct.
2020-03-10Make height option work under Windows (#1341)Michael Kelley
Separate Unix & Windows code into platform specific files for light renderer
2020-03-07Do not read more than 10K characters from /dev/ttyJunegunn Choi
This might help with #1456 where fzf hangs consuming CPU resources.
2020-03-05Add more --border options; default changed to "rounded"Junegunn Choi
--border option now takes an optional argument that defines the style - rounded (new default) - sharp - horizontal (previous default)
2020-02-24Add 'insert' key for --bindJunegunn Choi
Close #1744
2020-02-24Fix panic on unexpected escape sequencesJunegunn Choi
2020-01-18Fix F1, F2, F3, F4 on rxvt-unicodeJunegunn Choi
Tested on urxvt. Fix #1799.
2019-12-31Use rounded cornersJunegunn Choi
2019-12-12Add preview-fg and preview-bg for --colorJunegunn Choi
Close #1776
2019-12-12Gutter color of 16-color theme should be undefined by defaultJunegunn Choi
2019-11-15Fix --preview-window noborder with non-default background colorJunegunn Choi
2019-11-14More key chords for --bindJunegunn Choi
Close #1752
2019-11-05Improvements to code quality and readability (#1737)Alexandr
* Remove 1 unused field and 3 unused functions unused elements fount by running golangci-lint run --disable-all --enable unused src/result.go:19:2: field `index` is unused (unused) index int32 ^ src/tui/light.go:716:23: func `(*LightWindow).stderr` is unused (unused) func (w *LightWindow) stderr(str string) { ^ src/terminal.go:1015:6: func `numLinesMax` is unused (unused) func numLinesMax(str string, max int) int { ^ src/tui/tui.go:167:20: func `ColorPair.is24` is unused (unused) func (p ColorPair) is24() bool { ^ * Address warnings from "gosimple" linter src/options.go:389:83: S1003: should use strings.Contains(str, ",,,") instead (gosimple) if str == "," || strings.HasPrefix(str, ",,") || strings.HasSuffix(str, ",,") || strings.Index(str, ",,,") >= 0 { ^ src/options.go:630:18: S1007: should use raw string (`...`) with regexp.MustCompile to avoid having to escape twice (gosimple) executeRegexp = regexp.MustCompile( ^ src/terminal.go:29:16: S1007: should use raw string (`...`) with regexp.MustCompile to avoid having to escape twice (gosimple) placeholder = regexp.MustCompile("\\\\?(?:{[+sf]*[0-9,-.]*}|{q}|{\\+?f?nf?})") ^ src/terminal_test.go:92:10: S1007: should use raw string (`...`) with regexp.MustCompile to avoid having to escape twice (gosimple) regex = regexp.MustCompile("\\w+") ^ * Address warnings from "staticcheck" linter src/algo/algo.go:374:2: SA4006: this value of `offset32` is never used (staticcheck) offset32, T := alloc32(offset32, slab, N) ^ src/algo/algo.go:456:2: SA4006: this value of `offset16` is never used (staticcheck) offset16, C := alloc16(offset16, slab, width*M) ^ src/tui/tui.go:119:2: SA9004: only the first constant in this group has an explicit type (staticcheck) colUndefined Color = -2 ^
2019-08-06Fix #1657: alt-0 to alt-9Junegunn Choi
2019-07-19Code cleanup (#1640)Christian Muehlhaeuser
- Replaced time.Now().Sub() with time.Since() - Replaced unnecessary string/byte slice conversions - Removed obsolete return and value assignment in range loop
2019-03-29Add --no-unicode option to draw borders in ASCII charactersJunegunn Choi
Close ##1533
2019-03-17Add color option for gutterJunegunn Choi
fzf --color gutter:-1 Close #1529 Close #1468
2018-09-28Do not wait for more keystrokes after double escape charactersJunegunn Choi
Close #1393
2018-09-27Restore STDIN during execute-silentJunegunn Choi
This allows users to terminate the process with CTRL-C when it hangs.
2018-09-27Don't drop buffered input data in findOffset() (#1392)Tim Cuthbertson
2018-08-08Handle incomplete ESC sequence in typeahead buffer (#1350)Michael Kelley
If an ESC char is found while processing characters, continue to check for characters. This prevents fzf from prematurely exiting. Close #1349
2018-04-25Implement ttyname() in case /dev/tty is not availableJunegunn Choi
Close #1266 Close #447
2018-04-12Do not print non-displayable charactersJunegunn Choi
fzf used to print non-displayable characters (ascii code < 32) as '?', but we will simply ignore those characters with this patch, just like our terminals do. \n and \r are exceptions. They will be printed as a space character. TODO: \H should delete the preceding character, but this is not implemented. Related: #1253
2018-04-12Add support for alt-{up,down,left,right} keysJunegunn Choi
Close #1234
2018-02-15Add shift-up and shift-downJunegunn Choi
For now, they are respectively bound to preview-up and preview-down by default (TBD). Not available on tcell build. Close #1201
2017-12-01Support binding of left-click and right-clickJunegunn Choi
left-click and right-click are respectively bound to "ignore" and "toggle" (after implicitly moving the cursor) by default. Close #1130