aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/vendor/golang.org/x/term
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/vendor/golang.org/x/term')
-rw-r--r--src/cmd/vendor/golang.org/x/term/AUTHORS3
-rw-r--r--src/cmd/vendor/golang.org/x/term/CONTRIBUTORS3
-rw-r--r--src/cmd/vendor/golang.org/x/term/terminal.go2
3 files changed, 1 insertions, 7 deletions
diff --git a/src/cmd/vendor/golang.org/x/term/AUTHORS b/src/cmd/vendor/golang.org/x/term/AUTHORS
deleted file mode 100644
index 15167cd746..0000000000
--- a/src/cmd/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/src/cmd/vendor/golang.org/x/term/CONTRIBUTORS b/src/cmd/vendor/golang.org/x/term/CONTRIBUTORS
deleted file mode 100644
index 1c4577e968..0000000000
--- a/src/cmd/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/src/cmd/vendor/golang.org/x/term/terminal.go b/src/cmd/vendor/golang.org/x/term/terminal.go
index 535ab8257c..4b48a5899d 100644
--- a/src/cmd/vendor/golang.org/x/term/terminal.go
+++ b/src/cmd/vendor/golang.org/x/term/terminal.go
@@ -935,7 +935,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