mirror of
https://github.com/junegunn/fzf.git
synced 2026-10-13 08:29:04 +08:00
refactor: use maps.Copy and maps.Clone (#4518)
Signed-off-by: mickychang9 <mickychang9@outlook.com>
This commit is contained in:
1 parent
9bdacc8df2
commit
760d1b7c58
3 files changed
+6
-11
No files matched your search
+2
-4
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user