diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2022-06-13 11:01:26 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2022-08-06 13:49:11 +1000 |
commit | 524bf83a4a681408c3fb57818f6968cab632e0ae (patch) | |
tree | 8858b4ee8d4670dcdd1637fe5fedf00ff080c154 /vendor/golang.org/x/term | |
parent | 6dfef08efc5c7f262194c0af35fd777428f33a1a (diff) |
refactor to only have one context per view
Diffstat (limited to 'vendor/golang.org/x/term')
-rw-r--r-- | vendor/golang.org/x/term/AUTHORS | 3 | ||||
-rw-r--r-- | vendor/golang.org/x/term/CONTRIBUTORS | 3 | ||||
-rw-r--r-- | vendor/golang.org/x/term/terminal.go | 2 |
3 files changed, 1 insertions, 7 deletions
diff --git a/vendor/golang.org/x/term/AUTHORS b/vendor/golang.org/x/term/AUTHORS deleted file mode 100644 index 15167cd74..000000000 --- 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 1c4577e96..000000000 --- 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/terminal.go b/vendor/golang.org/x/term/terminal.go index 535ab8257..4b48a5899 100644 --- a/vendor/golang.org/x/term/terminal.go +++ b/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 |