Skip to content
Myr

Fix stray character artifacts when scrollbar is hidden

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

Fix #4537

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

  • tests:+23 added−0 removed
  • other:+7 added−0 removed

2 files+30 added−0 removed

modified:src/terminal.go+7 added
2395 unmodified lines
2396 innerWidth,2397 innerHeight-shrink, tui.WindowList, noBorder, true)2398 }23992400 if len(t.scrollbar) == 0 {2401 for y := 0; y < t.window.Height(); y++ {2402 t.window.Move(y, t.window.Width()-1)2403 t.window.Print(" ")2404 }2405 }24062407 createInnerWindow := func(b tui.Window, shape tui.BorderShape, windowType tui.WindowType, shift int) tui.Window {2408 top := b.Top()2409 left := b.Left() + shift2410 if shape.HasTop() {
4664 unmodified lines
modified:test/test_layout.rb+23 added
1190 unmodified lines
1191 BLOCK1192 tmux.until { assert_block(block, it) }1193 end11941195 # https://github.com/junegunn/fzf/issues/45371196 def test_no_scrollbar_preview_toggle1197 x = 'x' * 3001198 y = 'y' * 3001199 tmux.send_keys %(yes #{x} | head -1000 | fzf --bind 'tab:toggle-preview' --border --no-scrollbar --preview 'echo #{y}' --preview-window 'border-left'), :Enter12001201 # │ ▌ xxxxxxxx·· │ yyyyyyyy│1202 tmux.until do |lines|1203 lines.any? { it.match?(/x·· │ y+│$/) }1204 end1205 tmux.send_keys :Tab12061207 # │ ▌ xxxxxxxx·· │1208 tmux.until do |lines|1209 lines.none? { it.match?(/x··y│$/) }1210 end12111212 tmux.send_keys :Tab1213 tmux.until do |lines|1214 lines.any? { it.match?(/x·· │ y+│$/) }1215 end1216 end12171218 def test_combinations1219 skip unless ENV['LONGTEST']12201221 base = [
71 unmodified lines