fix selector bug caused by returned newline

This commit is contained in:
yory8 2019-03-22 22:23:14 +01:00
parent ec9d4f5eb3
commit cf9b496f25

View file

@ -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
}