aboutsummaryrefslogtreecommitdiffstats
path: root/community/fzf/use-explicit-int-to-string-conversion.patch
diff options
context:
space:
mode:
Diffstat (limited to 'community/fzf/use-explicit-int-to-string-conversion.patch')
-rw-r--r--community/fzf/use-explicit-int-to-string-conversion.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/community/fzf/use-explicit-int-to-string-conversion.patch b/community/fzf/use-explicit-int-to-string-conversion.patch
new file mode 100644
index 0000000000..7393f20a81
--- /dev/null
+++ b/community/fzf/use-explicit-int-to-string-conversion.patch
@@ -0,0 +1,36 @@
+From cab32ead2291fdbe5f5c284c71a693705533c700 Mon Sep 17 00:00:00 2001
+From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
+Date: Sat, 2 Jan 2021 23:25:43 -0500
+Subject: [PATCH] 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)?)
+```
+---
+ src/options.go | 4 ++--
+ 1 file 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