From 3321ac12a9c5bedaf98685b7b141d2444191f0cd Mon Sep 17 00:00:00 2001 From: Christian Rocha Date: Tue, 16 Jun 2020 14:34:46 -0400 Subject: [PATCH] Renderer comments --- viewport/renderer.go | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/viewport/renderer.go b/viewport/renderer.go index c9927e0..2f1a9e6 100644 --- a/viewport/renderer.go +++ b/viewport/renderer.go @@ -10,9 +10,18 @@ import ( ) type renderer struct { - Out io.Writer - Y int - Height int + // Out is the io.Writer to which we should render. Generally, this will + // be stdout. + Out io.Writer + + // Y is the vertical offset of the rendered area in relation to the + // terminal window. + Y int + + // Height is the number of rows to render. + Height int + + // TerminalHeight is the total height of the terminal. TerminalHeight int }