Return default text if skipping the text editor when prompted
If we are allowed to skip the editor _and_ we want to append the default text to the editor if we'd opened it, we just return the default text. Co-Authored-By: Mislav Marohnić <mislav@github.com>
This commit is contained in:
parent
b166376211
commit
d974dbd338
1 changed files with 1 additions and 1 deletions
|
|
@ -105,7 +105,7 @@ func (e *GhEditor) prompt(initialValue string, config *survey.PromptConfig) (int
|
|||
}
|
||||
if r == '\r' || r == '\n' {
|
||||
if e.BlankAllowed {
|
||||
return "", nil
|
||||
return initialValue, nil
|
||||
} else {
|
||||
continue
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue