fix(deps): update module github.com/moby/term to v0.5.0

Signed-off-by: Renovate Bot <bot@renovateapp.com>
This commit is contained in:
renovate[bot]
2023-05-02 13:51:31 +00:00
committed by GitHub
parent 867639e84d
commit 073cd4bb47
12 changed files with 212 additions and 185 deletions

View File

@@ -9,7 +9,6 @@ import (
"fmt"
"io"
"os"
"strconv"
"strings"
"unsafe"
@@ -196,10 +195,10 @@ func keyToString(keyEvent *winterm.KEY_EVENT_RECORD, escapeSequence []byte) stri
// <Alt>+Key generates ESC N Key
if !control && alt {
return ansiterm.KEY_ESC_N + strings.ToLower(strconv.Itoa(int(keyEvent.UnicodeChar)))
return ansiterm.KEY_ESC_N + strings.ToLower(string(rune(keyEvent.UnicodeChar)))
}
return strconv.Itoa(int(keyEvent.UnicodeChar))
return string(rune(keyEvent.UnicodeChar))
}
// formatVirtualKey converts a virtual key (e.g., up arrow) into the appropriate ANSI string.