refactor: use maps.Copy and maps.Clone (#4518)
CodeQL / Analyze (go) (push) Has been cancelled
build / build (push) Has been cancelled
Test fzf on macOS / build (push) Has been cancelled

Signed-off-by: mickychang9 <mickychang9@outlook.com>
This commit is contained in:
mickychang9 authored and GitHub committed 2025-09-29 18:11:19 +09:00
1 parent 9bdacc8df2
commit 760d1b7c58
3 files changed
+6 -11

No files matched your search

+2 -4
View File
@@ -6,6 +6,7 @@ import (
"encoding/json"
"fmt"
"io"
"maps"
"math"
"net"
"os"
@@ -950,10 +951,7 @@ func NewTerminal(opts *Options, eventBox *util.EventBox, executor *util.Executor
wordRubout = fmt.Sprintf("%s[^%s]", sep, sep)
wordNext = fmt.Sprintf("[^%s]%s|(.$)", sep, sep)
}
keymapCopy := make(map[tui.Event][]*action)
for key, action := range opts.Keymap {
keymapCopy[key] = action
}
keymapCopy := maps.Clone(opts.Keymap)
t := Terminal{
initDelay: delay,