edit: Only write bufListing when necessary.

This commit is contained in:
Qi Xiao 2016-02-14 17:52:06 +01:00
parent 097ecfe6f6
commit b9a2693e57

View File

@ -509,7 +509,7 @@ tokens:
// Render bufListing under the maximum height constraint
nav := es.navigation
hist := es.historyListing
if hListing > 0 {
if hListing > 0 && (comp != nil || nav != nil || hist != nil) {
b := newBuffer(width)
bufListing = b
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)
buf = bufLine
buf.extend(bufMode)