adding/increasing default number of lines for mr description rendering #45

Merged
smgt merged 2 commits from Add-lines-support-description into main 2026-01-20 07:30:34 +01:00
Collaborator

I thought instead of making an issue I'd try to solve it "my self".

I thought instead of making an issue I'd try to solve it "my self".
simon requested review from smgt 2026-01-19 14:53:58 +01:00
@ -19,2 +25,3 @@
CharLimit(1000000).
Value(&i.Text)
Value(&i.Text).
Lines(i.lines)
Owner

In go when you initialize a int it defaults to zero. So if the text input were to be used anywhere else with input.NewText("asdf") it would be zero lines long. I would recommend to instead check if i.lines is zero and if it is we don't pass Lines(i.lines) to huh.NewText.

t := huh.NewText().
Title(i.title).
CharLimit(10000000)

if i.linues != 0 {
  t = t.Lines(i.lines)
}

return t.Value(&i.Text)
In go when you initialize a int it defaults to zero. So if the text input were to be used anywhere else with `input.NewText("asdf")` it would be zero lines long. I would recommend to instead check if `i.lines` is zero and if it is we don't pass `Lines(i.lines)` to `huh.NewText`. ```go t := huh.NewText(). Title(i.title). CharLimit(10000000) if i.linues != 0 { t = t.Lines(i.lines) } return t.Value(&i.Text) ```
Author
Collaborator

Okay, tried to fix that now. running murp mr create still works.. =)

Okay, tried to fix that now. running `murp mr create `still works.. =)
smgt marked this conversation as resolved
Owner

LGTM!

LGTM!
smgt merged commit b0ea24ad77 into main 2026-01-20 07:30:34 +01:00
smgt deleted branch Add-lines-support-description 2026-01-20 07:30:34 +01:00
Sign in to join this conversation.
No reviewers
No labels
bug
feature
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
smgt/murp!45
No description provided.