mirror of
https://github.com/Maks1mS/bubbles.git
synced 2025-11-04 23:41:21 +03:00
Simplify the render's write() method and it now takes a slice of lines
This commit is contained in:
@@ -62,7 +62,7 @@ func (m *Model) SetContent(s string) {
|
||||
m.lines = strings.Split(s, "\n")
|
||||
|
||||
lines := bounded(m.lines, m.YOffset, m.Height)
|
||||
m.r.sync(strings.Join(lines, "\n"))
|
||||
m.r.sync(lines)
|
||||
}
|
||||
|
||||
// ViewDown moves the view down by the number of lines in the viewport.
|
||||
|
||||
Reference in New Issue
Block a user