Skip to content
Myr

Fix panic when use header border without pointer/marker (#4345)

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

authored by phanium · committed by GitHub · parent ed4442d · 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:+12 added−0 removed
  • other:+3 added−0 removed

2 files+15 added−0 removed

modified:src/terminal.go+3 added
2645 unmodified lines
2646 indentSize += 1 + t.borderWidth2647 }2648 if borderShape.HasLeft() {2649 indentSize -= 1 + t.borderWidth2650 if indentSize < 0 {2651 indentSize = 02652 }2653 }2654 return indentSize2655}2656
3712 unmodified lines
modified:test/test_layout.rb+12 added
989 unmodified lines
990 └──────────991 BLOCK992 tmux.until { assert_block(block, it) }993 end994995 def test_header_border_no_pointer_and_marker996 tmux.send_keys %(seq 10 | #{FZF} --header-lines 1 --header-border sharp --no-list-border --pointer '' --marker ''), :Enter997 block = <<~BLOCK998 ┌──────999 │ 11000 └──────1001 9/9 ─1002 >1003 BLOCK1004 tmux.until { assert_block(block, it) }1005 end1006end