mirror of
https://github.com/peco/peco.git
synced 2026-09-10 07:16:29 -04:00
Merge pull request #710 from peco/fix-len-check-style
Use idiomatic empty string check
This commit is contained in:
commit
a01c747f02
|
|
@ -98,7 +98,7 @@ func (as AnchorSettings) AnchorPosition() int {
|
|||
|
||||
// NewUserPrompt creates a new UserPrompt struct
|
||||
func NewUserPrompt(screen Screen, anchor VerticalAnchor, anchorOffset int, prompt string, styles *StyleSet) (*UserPrompt, error) {
|
||||
if len(prompt) <= 0 { // default
|
||||
if prompt == "" { // default
|
||||
prompt = DefaultPrompt
|
||||
}
|
||||
promptLen := runewidth.StringWidth(prompt)
|
||||
|
|
|
|||
Loading…
Reference in a new issue