From 468b98d2ebd8687d8506391b424f5a9a51d64e58 Mon Sep 17 00:00:00 2001 From: Christian Rocha Date: Fri, 19 Jun 2020 13:22:08 -0400 Subject: [PATCH] Comments in the pager example --- examples/pager/main.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/examples/pager/main.go b/examples/pager/main.go index 489f4e2..a0f9072 100644 --- a/examples/pager/main.go +++ b/examples/pager/main.go @@ -12,7 +12,14 @@ import ( ) const ( - useHighPerformanceRenderer = true + // You usually won't need this unless you're processing some pretty stuff + // with some pretty complicated ANSI escape sequences. Turn it on if you + // notice flickering. + // + // Also note that high performance rendering only works for programs that + // use the full size of the terminal. We're enabling that below with + // tea.AltScreen(). + useHighPerformanceRenderer = false headerHeight = 3 footerHeight = 3 @@ -22,7 +29,6 @@ func main() { // Load some text to render content, err := ioutil.ReadFile("artichoke.md") - //content, err := ioutil.ReadFile("menagerie.txt") if err != nil { fmt.Println("could not load file:", err) os.Exit(1)