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

doc-improvements
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(self.start .. ';1', 'H'))
self.sink:write(ansikit.getCSI(2, 'J')) self.sink:write(ansikit.getCSI(2, 'J'))
local writer = self.sink.writeln
for i = offset, offset + self.region.height - 1 do for i = offset, offset + self.region.height - 1 do
if i > #lines then break end if i > #lines then break end
local writer = self.sink.writeln
if i == offset + self.region.height - 1 then writer = self.sink.write end if i == offset + self.region.height - 1 then writer = self.sink.write end
writer(self.sink, sub(lines[i]:gsub('\t', ' '), self.region.width)) writer(self.sink, sub(lines[i]:gsub('\t', ' '), self.region.width))
end end
writer(self.sink, '\27[0m')
self:render() self:render()
end end