fix selector bug caused by returned newline
This commit is contained in:
parent
ec9d4f5eb3
commit
cf9b496f25
1 changed files with 2 additions and 1 deletions
|
@ -52,6 +52,7 @@ func dmenu(list []string, max int) (string, error) {
|
|||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
trimmed := selected[:len(selected)-1] // drop newline
|
||||
|
||||
return guide[string(selected)], nil
|
||||
return guide[string(trimmed)], nil
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue