Skip to content
Myr

Redraw/hide scroll offset when 'info' property is changed

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

authored by Junegunn Choi · committed by Junegunn Choi · parent 952276d · Browse files · 2 files+7 added−2 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+7 added−2 removed

  • tests:+6 added−1 removed
  • other:+1 added−1 removed

2 files+7 added−2 removed

modified:src/options.go+1 added-1 removed
385 unmodified lines
386 a.alternative == nil && b.alternative == nil)387}388389func (a previewOpts) sameContentLayout(b previewOpts) bool {390 return a.wrap == b.wrap && a.headerLines == b.headerLines390 return a.wrap == b.wrap && a.headerLines == b.headerLines && a.info == b.info391}392393func firstLine(s string) string {394 return strings.SplitN(s, "\n", 2)[0]
2602 unmodified lines
modified:test/test_go.rb+6 added-1 removed
3379 unmodified lines
3380 end33813382 def test_preview_window_noinfo3383 # │ 1 ││3384 tmux.send_keys %(#{FZF} --preview 'seq 1000' --preview-window top,noinfo --scrollbar), :Enter3384 tmux.send_keys %(#{FZF} --preview 'seq 1000' --preview-window top,noinfo --scrollbar --bind space:change-preview-window:info), :Enter3385 tmux.until do |lines|3386 assert lines[1]&.start_with?('│ 1')3387 assert lines[1]&.end_with?(' ││')3388 end3389 tmux.send_keys :Space3390 tmux.until do |lines|3391 assert lines[1]&.start_with?('│ 1')3392 assert lines[1]&.end_with?('1000││')3393 end3394 end3395end33963397module TestShell
521 unmodified lines