mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-12-22 10:58:59 +00:00
Restore previous behavior
This commit is contained in:
parent
3fc0bd26a5
commit
3148b0f3e8
@ -1695,6 +1695,9 @@ func (t *Terminal) resizeWindows(forcePreview bool) {
|
||||
marginInt[0], marginInt[3], width-pwidth, height, false, noBorder)
|
||||
// NOTE: fzf --preview 'cat {}' --preview-window border-left --border
|
||||
x := marginInt[3] + width - pwidth
|
||||
if !previewOpts.border.HasRight() && t.borderShape.HasRight() {
|
||||
pwidth++
|
||||
}
|
||||
createPreviewWindow(marginInt[0], x, pwidth, height)
|
||||
}
|
||||
}
|
||||
|
@ -3081,6 +3081,13 @@ class TestGoFZF < TestBase
|
||||
end
|
||||
end
|
||||
|
||||
def test_preview_window_width_exception
|
||||
tmux.send_keys "seq 10 | #{FZF} --scrollbar --preview-window border-left --border --preview 'seq 1000'", :Enter
|
||||
tmux.until do |lines|
|
||||
assert lines[1]&.end_with?(' 1/1000││')
|
||||
end
|
||||
end
|
||||
|
||||
def test_become
|
||||
tmux.send_keys "seq 100 | #{FZF} --bind 'enter:become:seq {} | #{FZF}'", :Enter
|
||||
tmux.until { |lines| assert_equal 100, lines.item_count }
|
||||
|
Loading…
Reference in New Issue
Block a user