fix(nature/greenhouse): fix style override on bottom titles

pull/260/head
sammyette 2023-12-17 22:21:25 -04:00
parent 7f6c459ba2
commit f3eac9f1c3
Signed by: sammyette
GPG Key ID: 904FC49417B44DCD
1 changed files with 2 additions and 1 deletions

View File

@ -82,14 +82,15 @@ function Greenhouse:draw()
self.sink:write(ansikit.getCSI(self.start .. ';1', 'H'))
self.sink:write(ansikit.getCSI(2, 'J'))
local writer = self.sink.writeln
for i = offset, offset + self.region.height - 1 do
if i > #lines then break end
local writer = self.sink.writeln
if i == offset + self.region.height - 1 then writer = self.sink.write end
writer(self.sink, sub(lines[i]:gsub('\t', ' '), self.region.width))
end
writer(self.sink, '\27[0m')
self:render()
end