From c099d31570a9ce11674cbf21d1ea6f2529e0145a Mon Sep 17 00:00:00 2001 From: Raphael 'kena' Poss Date: Thu, 25 Aug 2022 17:00:24 +0200 Subject: [PATCH] textarea: add some comments --- textarea/textarea.go | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/textarea/textarea.go b/textarea/textarea.go index e7bb682..2865e1a 100644 --- a/textarea/textarea.go +++ b/textarea/textarea.go @@ -133,11 +133,23 @@ type Model struct { Err error // General settings. - Prompt string - Placeholder string - ShowLineNumbers bool + + // Prompt is printed at the beginning of each line. + Prompt string + + // Placeholder is the text displayed when the user + // hasn't entered anything yet. + Placeholder string + + // ShowLineNumbers, if enabled, causes line numbers to be printed + // after the prompt. + ShowLineNumbers bool + + // EndOfBufferCharacter is displayed at the end of the input. EndOfBufferCharacter rune - KeyMap KeyMap + + // KeyMap encodes the keybindings recognized by the widget. + KeyMap KeyMap // Styling. FocusedStyle and BlurredStyle are used to style the textarea in // focused and blurred states.