aboutsummaryrefslogtreecommitdiff
path: root/vendor/golang.org/x/term
diff options
context:
space:
mode:
authorGibheer <gibheer+git@zero-knowledge.org>2022-11-11 11:22:50 +0100
committerGibheer <gibheer+git@zero-knowledge.org>2022-11-11 11:22:50 +0100
commitfe6bd04947e26a962fab3cf7a354abd44333bda6 (patch)
treede4714364747c05d391ab665176413eb24938545 /vendor/golang.org/x/term
parentdc9dfb76ff9375e6368e9e05a40e6dc07b325a8d (diff)
update dependencies
Diffstat (limited to 'vendor/golang.org/x/term')
-rw-r--r--vendor/golang.org/x/term/AUTHORS3
-rw-r--r--vendor/golang.org/x/term/CONTRIBUTORS3
-rw-r--r--vendor/golang.org/x/term/term.go10
-rw-r--r--vendor/golang.org/x/term/terminal.go3
4 files changed, 6 insertions, 13 deletions
diff --git a/vendor/golang.org/x/term/AUTHORS b/vendor/golang.org/x/term/AUTHORS
deleted file mode 100644
index 15167cd..0000000
--- a/vendor/golang.org/x/term/AUTHORS
+++ /dev/null
@@ -1,3 +0,0 @@
-# This source code refers to The Go Authors for copyright purposes.
-# The master list of authors is in the main Go distribution,
-# visible at http://tip.golang.org/AUTHORS.
diff --git a/vendor/golang.org/x/term/CONTRIBUTORS b/vendor/golang.org/x/term/CONTRIBUTORS
deleted file mode 100644
index 1c4577e..0000000
--- a/vendor/golang.org/x/term/CONTRIBUTORS
+++ /dev/null
@@ -1,3 +0,0 @@
-# This source code was written by the Go contributors.
-# The master list of contributors is in the main Go distribution,
-# visible at http://tip.golang.org/CONTRIBUTORS.
diff --git a/vendor/golang.org/x/term/term.go b/vendor/golang.org/x/term/term.go
index d592708..1a40d10 100644
--- a/vendor/golang.org/x/term/term.go
+++ b/vendor/golang.org/x/term/term.go
@@ -7,11 +7,11 @@
//
// Putting a terminal into raw mode is the most common requirement:
//
-// oldState, err := term.MakeRaw(int(os.Stdin.Fd()))
-// if err != nil {
-// panic(err)
-// }
-// defer term.Restore(int(os.Stdin.Fd()), oldState)
+// oldState, err := term.MakeRaw(int(os.Stdin.Fd()))
+// if err != nil {
+// panic(err)
+// }
+// defer term.Restore(int(os.Stdin.Fd()), oldState)
//
// Note that on non-Unix systems os.Stdin.Fd() may not be 0.
package term
diff --git a/vendor/golang.org/x/term/terminal.go b/vendor/golang.org/x/term/terminal.go
index 535ab82..f636667 100644
--- a/vendor/golang.org/x/term/terminal.go
+++ b/vendor/golang.org/x/term/terminal.go
@@ -233,7 +233,6 @@ func (t *Terminal) queue(data []rune) {
t.outBuf = append(t.outBuf, []byte(string(data))...)
}
-var eraseUnderCursor = []rune{' ', keyEscape, '[', 'D'}
var space = []rune{' '}
func isPrintable(key rune) bool {
@@ -935,7 +934,7 @@ func (s *stRingBuffer) Add(a string) {
// next most recent, and so on. If such an element doesn't exist then ok is
// false.
func (s *stRingBuffer) NthPreviousEntry(n int) (value string, ok bool) {
- if n >= s.size {
+ if n < 0 || n >= s.size {
return "", false
}
index := s.head - n