mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2025-02-02 12:08:34 +00:00
Fix tcell renderer's pause and resume
This commit is contained in:
parent
32234be7a2
commit
0c61223884
@ -560,7 +560,7 @@ func (r *FullscreenRenderer) GetChar() Event {
|
|||||||
|
|
||||||
func (r *FullscreenRenderer) Pause(clear bool) {
|
func (r *FullscreenRenderer) Pause(clear bool) {
|
||||||
if clear {
|
if clear {
|
||||||
_screen.Fini()
|
r.Close()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -572,6 +572,7 @@ func (r *FullscreenRenderer) Resume(clear bool, sigcont bool) {
|
|||||||
|
|
||||||
func (r *FullscreenRenderer) Close() {
|
func (r *FullscreenRenderer) Close() {
|
||||||
_screen.Fini()
|
_screen.Fini()
|
||||||
|
_screen = nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *FullscreenRenderer) RefreshWindows(windows []Window) {
|
func (r *FullscreenRenderer) RefreshWindows(windows []Window) {
|
||||||
|
@ -338,7 +338,7 @@ class TestLayout < TestInteractive
|
|||||||
end
|
end
|
||||||
|
|
||||||
def test_gap
|
def test_gap
|
||||||
tmux.send_keys %(seq 100 | #{FZF} --gap --border --reverse), :Enter
|
tmux.send_keys %(seq 100 | #{FZF} --gap --border rounded --reverse), :Enter
|
||||||
block = <<~BLOCK
|
block = <<~BLOCK
|
||||||
╭─────────────────
|
╭─────────────────
|
||||||
│ >
|
│ >
|
||||||
@ -355,7 +355,7 @@ class TestLayout < TestInteractive
|
|||||||
end
|
end
|
||||||
|
|
||||||
def test_gap_2
|
def test_gap_2
|
||||||
tmux.send_keys %(seq 100 | #{FZF} --gap=2 --gap-line xyz --border --reverse), :Enter
|
tmux.send_keys %(seq 100 | #{FZF} --gap=2 --gap-line xyz --border rounded --reverse), :Enter
|
||||||
block = <<~BLOCK
|
block = <<~BLOCK
|
||||||
╭─────────────────
|
╭─────────────────
|
||||||
│ >
|
│ >
|
||||||
@ -799,7 +799,7 @@ class TestLayout < TestInteractive
|
|||||||
end
|
end
|
||||||
|
|
||||||
def test_style_full_adaptive_height
|
def test_style_full_adaptive_height
|
||||||
tmux.send_keys %(seq 1| #{FZF} --style=full --height=~100% --header-lines=1 --info=default), :Enter
|
tmux.send_keys %(seq 1| #{FZF} --style=full:rounded --height=~100% --header-lines=1 --info=default), :Enter
|
||||||
block = <<~BLOCK
|
block = <<~BLOCK
|
||||||
╭────────
|
╭────────
|
||||||
╰────────
|
╰────────
|
||||||
|
@ -524,7 +524,7 @@ class TestPreview < TestInteractive
|
|||||||
end
|
end
|
||||||
|
|
||||||
def test_alternative_preview_window_opts
|
def test_alternative_preview_window_opts
|
||||||
tmux.send_keys "seq 10 | #{FZF} --preview-window '~5,2,+0,<100000(~0,+100,wrap,noinfo)' --preview 'seq 1000'", :Enter
|
tmux.send_keys "seq 10 | #{FZF} --preview-border rounded --preview-window '~5,2,+0,<100000(~0,+100,wrap,noinfo)' --preview 'seq 1000'", :Enter
|
||||||
tmux.until { |lines| assert_equal 10, lines.match_count }
|
tmux.until { |lines| assert_equal 10, lines.match_count }
|
||||||
tmux.until do |lines|
|
tmux.until do |lines|
|
||||||
assert_equal ['╭────╮', '│ 10 │', '│ 0 │', '│ 10 │', '│ 1 │'], lines.take(5).map(&:strip)
|
assert_equal ['╭────╮', '│ 10 │', '│ 0 │', '│ 10 │', '│ 1 │'], lines.take(5).map(&:strip)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user