File tree 1 file changed +10
-3
lines changed
1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -4850,11 +4850,18 @@ func (t *Terminal) constrain() {
4850
4850
linesSum := 0
4851
4851
4852
4852
add := func (i int ) bool {
4853
- lines , _ := t .numItemLines (t .merger .Get (i ).item , numItems - linesSum )
4853
+ lines , overflow := t .numItemLines (t .merger .Get (i ).item , numItems - linesSum )
4854
4854
linesSum += lines
4855
4855
if linesSum >= numItems {
4856
- if numItemsFound == 0 {
4857
- numItemsFound = 1
4856
+ /*
4857
+ # Should show all 3 items
4858
+ printf "file1\0file2\0file3\0" | fzf --height=5 --read0 --bind load:last --reverse
4859
+
4860
+ # Should not truncate the last item
4861
+ printf "file\n1\0file\n2\0file\n3\0" | fzf --height=5 --read0 --bind load:last --reverse
4862
+ */
4863
+ if numItemsFound == 0 || ! overflow {
4864
+ numItemsFound ++
4858
4865
}
4859
4866
return false
4860
4867
}
You can’t perform that action at this time.
0 commit comments