Skip to content
Myr

Fix toggle-preview-wrap action

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Fix #2336

authored by Junegunn Choi · committed by Junegunn Choi · parent 1cfeec0 · Browse files · 2 files+15 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+15 added−0 removed

  • tests:+13 added−0 removed
  • other:+2 added−0 removed

2 files+15 added−0 removed

modified:src/terminal.go+2 added
2220 unmodified lines
2221 }2222 case actTogglePreviewWrap:2223 if t.hasPreviewWindow() {2224 t.previewOpts.wrap = !t.previewOpts.wrap2225 // Reset preview version so that full redraw occurs2226 t.previewed.version = 02227 req(reqPreviewRefresh)2228 }2229 case actToggleSort:2230 t.sort = !t.sort
450 unmodified lines
modified:test/test_go.rb+13 added
1862 unmodified lines
1863 def test_preview_window_follow1864 tmux.send_keys "#{FZF} --preview 'seq 1000 | nl' --preview-window down:noborder:follow", :Enter1865 tmux.until { |lines| assert_equal '1000 1000', lines[-1].strip }1866 end18671868 def test_toggle_preview_wrap1869 tmux.send_keys "#{FZF} --preview 'for i in $(seq $FZF_PREVIEW_COLUMNS); do echo -n .; done; echo wrapped; echo 2nd line' --bind ctrl-w:toggle-preview-wrap", :Enter1870 2.times do1871 tmux.until { |lines| assert_includes lines[2], '2nd line' }1872 tmux.send_keys 'C-w'1873 tmux.until do |lines|1874 assert_includes lines[2], 'wrapped'1875 assert_includes lines[3], '2nd line'1876 end1877 tmux.send_keys 'C-w'1878 end1879 end1880end18811882module TestShell1883 def setup
478 unmodified lines