summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElliott Sales de Andrade <quantum.analyst@gmail.com>2021-01-02 23:25:43 -0500
committerJunegunn Choi <junegunn.c@gmail.com>2021-01-03 14:38:09 +0900
commit82791f7efccde5b30da0b4d44f10d214ae5c0c0d (patch)
tree75637322ab836b9da51cd2312324f0c3a112fb4d
parent8c533e34eacf310a0babbcdf6c512a08eb447389 (diff)
Use more explicit int-to-string conversion.
This fixes the following errors with Go 1.15: ``` src/options.go:452:69: conversion from untyped int to string yields a string of one rune, not a string of digits (did you mean fmt.Sprint(x)?) src/options.go:463:33: conversion from untyped int to string yields a string of one rune, not a string of digits (did you mean fmt.Sprint(x)?) ```
-rw-r--r--src/options.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/options.go b/src/options.go
index 12c09556..cee11ffc 100644
--- a/src/options.go
+++ b/src/options.go
@@ -449,7 +449,7 @@ func parseKeyChords(str string, message string) map[tui.Event]string {
errorExit(message)
}
- str = regexp.MustCompile("(?i)(alt-),").ReplaceAllString(str, "$1"+string(escapedComma))
+ str = regexp.MustCompile("(?i)(alt-),").ReplaceAllString(str, "$1"+string([]rune{escapedComma}))
tokens := strings.Split(str, ",")
if str == "," || strings.HasPrefix(str, ",,") || strings.HasSuffix(str, ",,") || strings.Contains(str, ",,,") {
tokens = append(tokens, ",")
@@ -460,7 +460,7 @@ func parseKeyChords(str string, message string) map[tui.Event]string {
if len(key) == 0 {
continue // ignore
}
- key = strings.ReplaceAll(key, string(escapedComma), ",")
+ key = strings.ReplaceAll(key, string([]rune{escapedComma}), ",")
lkey := strings.ToLower(key)
add := func(e tui.EventType) {
chords[e.AsEvent()] = key