Update Vendors (#337)
* update & migrate gitea sdk (Fix Delete Tag Issue) * upgraded github.com/AlecAivazis/survey v2.2.7 => v2.2.8 * upgraded github.com/adrg/xdg v0.2.3 => v0.3.1 * upgraded github.com/araddon/dateparse * upgraded github.com/olekukonko/tablewriter v0.0.4 => v0.0.5 * upgraded gopkg.in/yaml.v2 v2.3.0 => v2.4.0 Reviewed-on: https://gitea.com/gitea/tea/pulls/337 Reviewed-by: Norwin <noerw@noreply.gitea.io> Reviewed-by: khmarbaise <khmarbaise@noreply.gitea.io> Co-authored-by: 6543 <6543@obermui.de> Co-committed-by: 6543 <6543@obermui.de>
This commit is contained in:
11
vendor/github.com/muesli/reflow/ansi/buffer.go
generated
vendored
11
vendor/github.com/muesli/reflow/ansi/buffer.go
generated
vendored
@@ -11,16 +11,11 @@ type Buffer struct {
|
||||
bytes.Buffer
|
||||
}
|
||||
|
||||
// PrintableRuneWidth returns the width of all printable runes in the buffer.
|
||||
func (w Buffer) PrintableRuneWidth() int {
|
||||
return PrintableRuneWidth(w.String())
|
||||
}
|
||||
|
||||
func PrintableRuneWidth(s string) int {
|
||||
// PrintableRuneCount returns the amount of printable runes in the buffer.
|
||||
func (w Buffer) PrintableRuneCount() int {
|
||||
var n int
|
||||
var ansi bool
|
||||
|
||||
for _, c := range s {
|
||||
for _, c := range w.String() {
|
||||
if c == '\x1B' {
|
||||
// ANSI escape sequence
|
||||
ansi = true
|
||||
|
||||
6
vendor/github.com/muesli/reflow/wordwrap/wordwrap.go
generated
vendored
6
vendor/github.com/muesli/reflow/wordwrap/wordwrap.go
generated
vendored
@@ -66,7 +66,7 @@ func (w *WordWrap) addSpace() {
|
||||
func (w *WordWrap) addWord() {
|
||||
if w.word.Len() > 0 {
|
||||
w.addSpace()
|
||||
w.lineLen += w.word.PrintableRuneWidth()
|
||||
w.lineLen += w.word.PrintableRuneCount()
|
||||
w.buf.Write(w.word.Bytes())
|
||||
w.word.Reset()
|
||||
}
|
||||
@@ -139,8 +139,8 @@ func (w *WordWrap) Write(b []byte) (int, error) {
|
||||
|
||||
// add a line break if the current word would exceed the line's
|
||||
// character limit
|
||||
if w.lineLen+w.space.Len()+w.word.PrintableRuneWidth() > w.Limit &&
|
||||
w.word.PrintableRuneWidth() < w.Limit {
|
||||
if w.lineLen+w.space.Len()+w.word.PrintableRuneCount() > w.Limit &&
|
||||
w.word.PrintableRuneCount() < w.Limit {
|
||||
w.addNewLine()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user