mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-13 18:07:51 +08:00
edit: Only write bufListing when necessary.
This commit is contained in:
parent
097ecfe6f6
commit
b9a2693e57
|
@ -509,7 +509,7 @@ tokens:
|
||||||
// Render bufListing under the maximum height constraint
|
// Render bufListing under the maximum height constraint
|
||||||
nav := es.navigation
|
nav := es.navigation
|
||||||
hist := es.historyListing
|
hist := es.historyListing
|
||||||
if hListing > 0 {
|
if hListing > 0 && (comp != nil || nav != nil || hist != nil) {
|
||||||
b := newBuffer(width)
|
b := newBuffer(width)
|
||||||
bufListing = b
|
bufListing = b
|
||||||
if comp != nil { // Completion listing
|
if comp != nil { // Completion listing
|
||||||
|
@ -594,6 +594,9 @@ tokens:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Logger.Printf("bufLine %d, bufMode %d, bufTips %d, bufListing %d",
|
||||||
|
lines(bufLine), lines(bufMode), lines(bufTips), lines(bufListing))
|
||||||
|
|
||||||
// Combine buffers (reusing bufLine)
|
// Combine buffers (reusing bufLine)
|
||||||
buf = bufLine
|
buf = bufLine
|
||||||
buf.extend(bufMode)
|
buf.extend(bufMode)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user