Don't even bother with text wrapping
This is a pretty useless feature, all things considered. It should be the job of the application to figure that out.
This commit is contained in:
parent
f98b551ba2
commit
3abba9d69b
10
buffer.go
10
buffer.go
@ -98,10 +98,7 @@ func (buffer *Buffer) Write (bytes []byte) (bytesWritten int, err error) {
|
||||
for _, character := range text {
|
||||
buffer.SetRune(buffer.Dot.X, buffer.Dot.Y, character)
|
||||
buffer.Dot.X ++
|
||||
if buffer.Dot.X > buffer.width || character == '\n' {
|
||||
buffer.Dot.X = 0
|
||||
buffer.Dot.Y ++
|
||||
}
|
||||
if buffer.Dot.X > buffer.width { break }
|
||||
}
|
||||
|
||||
return
|
||||
@ -150,10 +147,7 @@ func (buffer *DamageBuffer) Write (bytes []byte) (bytesWritten int, err error) {
|
||||
for _, character := range text {
|
||||
buffer.SetRune(buffer.Dot.X, buffer.Dot.Y, character)
|
||||
buffer.Dot.X ++
|
||||
if buffer.Dot.X > buffer.width || character == '\n' {
|
||||
buffer.Dot.X = 0
|
||||
buffer.Dot.Y ++
|
||||
}
|
||||
if buffer.Dot.X > buffer.width { break }
|
||||
}
|
||||
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user