mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-12 17:27:50 +08:00
Consider bufNoti when calculating the height of bufListing.
This commit is contained in:
parent
213e43ee1b
commit
2c97375636
|
@ -473,19 +473,21 @@ tokens:
|
|||
hListing := 0
|
||||
// Trim lines and determine the maximum height for bufListing
|
||||
switch {
|
||||
case height >= lines(bufLine, bufMode, bufTips):
|
||||
case height >= lines(bufNoti, bufLine, bufMode, bufTips):
|
||||
hListing = height - lines(bufLine, bufMode, bufTips)
|
||||
case height >= lines(bufLine, bufTips):
|
||||
bufMode, bufListing = nil, nil
|
||||
case height >= lines(bufLine):
|
||||
bufTips, bufMode, bufListing = nil, nil, nil
|
||||
case height >= lines(butNoti, bufLine, bufTips):
|
||||
bufMode = nil
|
||||
case height >= lines(butNoti, bufLine):
|
||||
bufTips, bufMode = nil, nil
|
||||
case height >= lines(butLine):
|
||||
bufNoti, bufTips, bufMode = nil, nil, nil
|
||||
case height >= 1:
|
||||
bufTips, bufMode, bufListing = nil, nil, nil
|
||||
bufNoti, bufTips, bufMode = nil, nil, nil
|
||||
dotLine := bufLine.dot.line
|
||||
bufLine.trimToLines(dotLine+1-height, dotLine+1)
|
||||
default:
|
||||
// Broken terminal. Still try to render one line of bufLine.
|
||||
bufTips, bufMode, bufListing = nil, nil, nil
|
||||
bufNoti, bufTips, bufMode = nil, nil
|
||||
dotLine := bufLine.dot.line
|
||||
bufLine.trimToLines(dotLine, dotLine+1)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user