github.com/elves/elvish@v0.15.0/pkg/cli/empty.go (about)

     1  package cli
     2  
     3  import (
     4  	"github.com/elves/elvish/pkg/cli/term"
     5  )
     6  
     7  // Empty is an empty widget.
     8  type Empty struct{}
     9  
    10  // Render shows nothing, although the resulting Buffer still occupies one line.
    11  func (Empty) Render(width, height int) *term.Buffer {
    12  	return term.NewBufferBuilder(width).Buffer()
    13  }
    14  
    15  // Handle always returns false.
    16  func (Empty) Handle(event term.Event) bool {
    17  	return false
    18  }