summaryrefslogtreecommitdiffstats
path: root/src/terminal.go
AgeCommit message (Collapse)Author
2023-10-31Restore scroll after rendering full-height Sixel image (#2544)Junegunn Choi
When a Sixel image touches the bottom of the screen, the whole screen scrolls up one line to make room for the cursor. Add an ANSI escape code to compensate for the movement. Unfortunately, the movement of the screen is sometimes noticeable. fzf --preview='fzf-preview.sh {}' --preview-window border-left
2023-10-29Fix Sixel height calculation (#2544)Junegunn Choi
2023-10-27Fix Sixel issues (#2544)Junegunn Choi
* Fix regression where previous image is not properly cleared * Change the way fzf calculates the number of required lines to display an image (ceil -> floor) to fix the issue where an image is always rendered as a wireframe.
2023-10-26Clear previous non-Sixel text before rendering Sixel image (#2544)Junegunn Choi
2023-10-26Remove $FZF_PREVIEW_PIXEL_{WIDTH,HEIGHT} (#2544)Junegunn Choi
They are not neccessary because we can use a program such as chafa that can resize images by the terminal columns and lines.
2023-10-26(Experimental) Improve Sixel graphics support (#2544)Junegunn Choi
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
2023-10-23Experimental Sixel support (#2544)Junegunn Choi
2023-10-21Fix bug where top section of the previous preview content appearingJunegunn Choi
when the preview window is re-enabled and the current preview process is taking more than 500ms and previewDelayed is triggered fzf --preview 'sleep 1; date; seq 1000' --bind space:toggle-preview
2023-10-20Fix scrollability of the preview window when preview offset is specifiedJunegunn Choi
This should not be scrollable fzf --preview 'seq $FZF_PREVIEW_LINES' --preview-window '~5'
2023-10-20Fix inconsistent preview window width with --borderJunegunn Choi
fzf --preview 'cat {}' --bind 'space:change-preview-window:up|right' --border
2023-10-12Fix offset-up and offset-down with --layout=reverse (#3456)Junegunn Choi
2023-10-11Add offset-up and offset-downJunegunn Choi
# Scrolling will behave similarly to CTRL-E and CTRL-Y of vim fzf --bind scroll-up:offset-up,scroll-down:offset-down \ --bind ctrl-y:offset-up,ctrl-e:offset-down \ --scroll-off=5 Close #3456
2023-10-11Add mouse events for --bindJunegunn Choi
Close #3473
2023-10-07Experimental support for Kitty image protocol in preview windowJunegunn Choi
Close #3228 * Works inside and outside of tmux * There is a problem where fzf unnecessarily displays the scroll offset indicator at the topbright of the screen when the image just fits the preview window. This is because `kitty icat` generates an extra line after the image area. # A 5-row images; an extra row at the end confuses fzf ["\e_Ga ... \e[9C􎻮̅̅ࠪ􎻮̅̍ࠪ􎻮̅̎ࠪ􎻮̅̐ࠪ􎻮̅̒ࠪ􎻮̅̽ࠪ􎻮̅̾ࠪ􎻮̅̿ࠪ􎻮̅͆ࠪ􎻮̅͊ࠪ􎻮̅͋ࠪ\n", "\r\e[9C􎻮̍̅ࠪ􎻮̍̍ࠪ􎻮̍̎ࠪ􎻮̍̐ࠪ􎻮̍̒ࠪ􎻮̍̽ࠪ􎻮̍̾ࠪ􎻮̍̿ࠪ􎻮̍͆ࠪ􎻮̍͊ࠪ􎻮̍͋ࠪ\n", "\r\e[9C􎻮̎̅ࠪ􎻮̎̍ࠪ􎻮̎̎ࠪ􎻮̎̐ࠪ􎻮̎̒ࠪ􎻮̎̽ࠪ􎻮̎̾ࠪ􎻮̎̿ࠪ􎻮̎͆ࠪ􎻮̎͊ࠪ􎻮̎͋ࠪ\n", "\r\e[9C􎻮̐̅ࠪ􎻮̐̍ࠪ􎻮̐̎ࠪ􎻮̐̐ࠪ􎻮̐̒ࠪ􎻮̐̽ࠪ􎻮̐̾ࠪ􎻮̐̿ࠪ􎻮̐͆ࠪ􎻮̐͊ࠪ􎻮̐͋ࠪ\n", "\r\e[9C􎻮̒̅ࠪ􎻮̒̍ࠪ􎻮̒̎ࠪ􎻮̒̐ࠪ􎻮̒̒ࠪ􎻮̒̽ࠪ􎻮̒̾ࠪ􎻮̒̿ࠪ􎻮̒͆ࠪ􎻮̒͊ࠪ􎻮̒͋ࠪ\n", "\r\e[39m\e8"] * Example: fzf --preview=' if file --mime-type {} | grep -qF 'image/'; then # --transfer-mode=memory is the fastest option but if you want fzf to be able # to redraw the image on terminal resize or on 'change-preview-window', # you need to use --transfer-mode=stream. kitty icat --clear --transfer-mode=memory --stdin=no --place=${FZF_PREVIEW_COLUMNS}x${FZF_PREVIEW_LINES}@0x0 {} else bat --color=always {} fi '
2023-09-18Add support for limit and offset parameters for GET / endpointJunegunn Choi
Related #3372
2023-09-03Add 'GET /' endpoint for getting the program state (experimental)Junegunn Choi
Related #3372
2023-09-01Fix center-alignment of border/preview labelJunegunn Choi
Fix #3421
2023-07-25Fix ANSI color continuation in --headerJunegunn Choi
# Both lines should be in red fzf --header $'\x1b[31mfoo\nbar'
2023-07-25Add toggle-header optionJunegunn Choi
Close #3358
2023-07-16Fix deprecations of ioutil (#3370)Bart
2023-07-05Correct outdated commentJunegunn Choi
2023-06-17Use strings.ContainsRune instead (#3335)guangwu
2023-06-11Add --info=rightJunegunn Choi
Related: #3322
2023-06-10Add --info=inline-rightJunegunn Choi
Close #3322
2023-06-10Fix background color of spinner on the preview windowJunegunn Choi
2023-06-10Add new border style: 'thinblock' (#3327)Mike
Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
2023-05-27Fix bug where preview is not updated after reload when --disabled is setJunegunn Choi
Fix #3311
2023-05-21Make sure 'become' process is given a proper tty deviceJunegunn Choi
2023-05-17Allow unbind(focus)Junegunn Choi
Fix #3279
2023-05-17Fix panic when trying to render preview window of a negative heightJunegunn Choi
Fix #3292
2023-05-16Allow customizing scrollbar of the preview window via --scrollbar=xyJunegunn Choi
2023-05-16Add new border style: 'block'Junegunn Choi
2023-05-16Allow customizing the color of preview scrollbar via 'preview-scrollbar'Junegunn Choi
2023-05-05Fix the behavior of change-preview-window action (#3280)Junegunn Choi
* change-preview-window restores the initial preview window options, and overrides the properties that are specified * However, 'hidden' property is treated differently. It is set to 'false' if the specified properties of the action is non-empty. * cf. toggle-preview takes the "current" preview window options and toggles the 'hidden' property.
2023-05-01Fix the background color of the scrollbar inside the preview windowJunegunn Choi
2023-05-010.40.00.40.0Junegunn Choi
2023-04-30Do not display trailing carriage returns in the preview windowJunegunn Choi
Close #3269
2023-04-30Fix search not triggered when query change and reload happen at the same timeJunegunn Choi
Fix #3268
2023-04-26Add 'zero' eventJunegunn Choi
Close #3263
2023-04-22Add 'track' actionJunegunn Choi
2023-04-22Add change-header and transform-headerJunegunn Choi
Close #3237
2023-04-22Add toggle-track actionJunegunn Choi
2023-04-22Fixed --track when used with --tacJunegunn Choi
Fix #3234
2023-04-01Add 'one' eventJunegunn Choi
Close #2629 Close #2494 Close #459
2023-04-01Add --track option to track the current selectionJunegunn Choi
Close #3186 Related #1890
2023-03-26Respect 'regular' attribute in 'bw' base themeJunegunn Choi
Don't make the text bold if an element is explicitly specified as 'regular'. Fix #3222
2023-03-25Render CR and LF as ␍ and ␊Junegunn Choi
Close #2529
2023-03-19Omit port number in `--listen` for automatic port assignmentJunegunn Choi
Close #3200
2023-03-17Fix extra new line in the preview windowJunegunn Choi
When a colored text ends at the right end of the window Fix #3209
2023-02-23Add spell check workflow (#3183)Zhizhen He