Skip to content

Commit bb032a9

Browse files
committed
adding check if char == '-', if so not using as modifier
Fixes: https://todo.sr.ht/~eliasnaur/gio/432 Signed-off-by: Jeff Aigner <enumeration@gmail.com>
1 parent dee53b3 commit bb032a9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

io/key/key.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,11 @@ func (k Set) Contains(name string, mods Modifiers) bool {
238238
var modSet, keySet string
239239
sep := strings.LastIndex(chord, "-")
240240
if sep != -1 {
241-
modSet, keySet = chord[:sep], chord[sep+1:]
241+
if chord == "-" {
242+
modSet, keySet = "", chord
243+
} else {
244+
modSet, keySet = chord[:sep], chord[sep+1:]
245+
}
242246
} else {
243247
modSet, keySet = "", chord
244248
}

0 commit comments

Comments
 (0)