Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

textarea: fix the pre-allocation of value #213

Merged
merged 1 commit into from
Aug 15, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions textarea/textarea.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ func New() Model {
Cursor: cur,
KeyMap: DefaultKeyMap,

value: make([][]rune, minHeight, maxWidth),
value: make([][]rune, minHeight, maxHeight),
focus: false,
col: 0,
row: 0,
Expand Down Expand Up @@ -409,7 +409,7 @@ func (m *Model) Blur() {

// Reset sets the input to its default state with no input.
func (m *Model) Reset() {
m.value = make([][]rune, minHeight, maxWidth)
m.value = make([][]rune, minHeight, maxHeight)
m.col = 0
m.row = 0
m.viewport.GotoTop()
Expand Down