summaryrefslogtreecommitdiff
path: root/src/util/util.go
AgeCommit message (Collapse)Author
2025-06-10Add footerJunegunn Choi
Options: --footer=STR String to print as footer --footer-border[=STYLE] Draw border around the footer section [rounded|sharp|bold|block|thinblock|double|horizontal|vertical| top|bottom|left|right|line|none] (default: line) --footer-label=LABEL Label to print on the footer border --footer-label-pos=COL Position of the footer label [POSITIVE_INTEGER: columns from left| NEGATIVE_INTEGER: columns from right][:bottom] (default: 0 or center) The default border type for footer is 'line', which draws a single separator between the footer and the list. It changes its position depending on `--layout`, so you don't have to manually switch between 'top' and 'bottom' The 'line' style is now supported by other border types as well. `--list-border` is the only exception.
2024-06-22Make transform*, --info-command, and execute-silent cancellableJunegunn Choi
Users can press CTRL-C after 1 second to terminate the command. Close #3883
2024-05-23execute: Open separate handles to /dev/tty (in, out, err)Junegunn Choi
# This will no longer cause 'Vim: Warning: Output is not to a terminal' fzf --bind 'enter:execute:vim {}' > /tmp/foo
2024-05-23Use MSYS=enable_pcon instead of winpty on mintty 3.4.5 or laterJunegunn Choi
2024-05-20Use winpty to launch fzf in Git bash (mintty)Junegunn Choi
Close #3806 Known limitation: * --height cannot be used
2024-04-13Export $FZF_KEY environment variable to child processesJunegunn Choi
It's the name of the last key pressed. Related #3412
2024-01-27junegunn/uniseg -> rivo/unisegJunegunn Choi
https://github.com/rivo/uniseg/pull/47
2024-01-21Change mattn/go-runewidth dependency to rivo/uniseg for accurate resultsJunegunn Choi
Related #3588 #3588 #3567
2024-01-14Remove 'replace' directive for 'go install' compatibilityJunegunn Choi
Close #3577
2023-03-25Render CR and LF as ␍ and ␊Junegunn Choi
Close #2529
2022-11-10Add --separator to customize the info separatorJunegunn Choi
2022-03-29Add --ellipsis=.. optionJunegunn Choi
Close #2432 Also see - #1769 - https://github.com/junegunn/fzf/pull/1844#issuecomment-586663660
2021-12-22Fix rendering of the prompt line when overflow occurs with `--info=inline`Junegunn Choi
Fix #2692
2021-10-03[tests] Add testing of keyboard events in FullscreenRenderer.GetChar()Vlastimil Ovčáčík
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).
2021-06-01Fix bug where `--read0` not properly displaying long linesJunegunn Choi
Fix #2508
2021-05-14Replace RuneWidth to StringWidth to handle grapheme clustersJunegunn Choi
Fix #2482
2019-12-09Defer resetting multi-selection on reloadJunegunn Choi
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
2017-06-01Use glide to handle go dependenciesEdgar Lee
2017-01-09Make util.RuneWidth return 1 for non-displayable charactersJunegunn Choi
Fix line wrapping in preview window
2017-01-08Add --height optionJunegunn Choi
2016-11-07Prepare for termbox/windows buildJunegunn Choi
`TAGS=termbox make` (or `go build -tags termbox`)
2016-09-18Revise ranking algorithmJunegunn Choi
2016-08-19Micro-optimizationsJunegunn Choi
- Make structs smaller - Introduce Result struct and use it to represent matched items instead of reusing Item struct for that purpose - Avoid unnecessary memory allocation - Avoid growing slice from the initial capacity - Code cleanup
2016-08-14[perf] evaluateBonus can start from sidx - 1Junegunn Choi
2016-08-14[perf] Optimize AWK-style tokenizer for --nthJunegunn Choi
Approx. 50% less memory footprint and 40% improvement in query time
2016-08-14[perf] Avoid allocating rune array for ascii stringJunegunn Choi
In the best case (all ascii), this reduces the memory footprint by 60% and the response time by 15% to 20%. In the worst case (every line has non-ascii characters), 3 to 4% overhead is observed.
2016-03-02Add --hscroll-off=COL optionJunegunn Choi
Close #513
2016-02-07Use $SHELL to start $FZF_DEFAULT_COMMAND (#481)Junegunn Choi
2015-10-02Use trimmed length when --nth is used with --tiebreak=lengthJunegunn Choi
This change improves sort ordering for aligned tabular input. Given the following input: apple juice 100 apple pie 200 fzf --nth=2 will now prefer the one with pie. Before this change fzf compared "juice " and "pie ", both of which have the same length.
2015-08-02GoLintJunegunn Choi
2015-08-02Performance fix - unnecessary rune convertion on --ansiJunegunn Choi
> time cat /tmp/list | fzf-0.10.1-darwin_amd64 --ansi -fqwerty > /dev/null real 0m4.364s user 0m8.231s sys 0m0.820s > time cat /tmp/list | fzf --ansi -fqwerty > /dev/null real 0m4.624s user 0m5.755s sys 0m0.732s
2015-08-02Performance tuning - eager rune array conversionJunegunn Choi
> wc -l /tmp/list2 2594098 /tmp/list2 > time cat /tmp/list2 | fzf-0.10.1-darwin_amd64 -fqwerty > /dev/null real 0m5.418s user 0m10.990s sys 0m1.302s > time cat /tmp/list2 | fzf-head -fqwerty > /dev/null real 0m4.862s user 0m6.619s sys 0m0.982s
2015-04-17Improvements in performance and memory usageJunegunn Choi
I profiled fzf and it turned out that it was spending significant amount of time repeatedly converting character arrays into Unicode codepoints. This commit greatly improves search performance after the initial scan by memoizing the converted results. This commit also addresses the problem of unbounded memory usage of fzf. fzf is a short-lived process that usually processes small input, so it was implemented to cache the intermediate results very aggressively with no notion of cache expiration/eviction. I still think a proper implementation of caching scheme is definitely an overkill. Instead this commit introduces limits to the maximum size (or minimum selectivity) of the intermediate results that can be cached.
2015-04-16Add --no-hscroll option to disable horizontal scrollJunegunn Choi
Close #193
2015-03-29Implement --expect option to support simple key bindings (#163)Junegunn Choi
2015-03-19Add support for ANSI color codesJunegunn Choi
2015-01-12Reorganize source codeJunegunn Choi