Closed b0o closed 5 months ago
With no border, spacing is correct:
local n = require 'nui-components' local renderer = n.create_renderer { width = 64, height = 20, } renderer:render( n.paragraph { lines = { n.line(n.text('Foo', 'Keyword')), n.line(n.text('Bar', 'Keyword')), n.line(n.text('Qux', 'Keyword')), }, } )
When adding a border, we get extra blank lines. I think there is an issue with width calculation causing the lines to wrap.
local n = require 'nui-components' local renderer = n.create_renderer { width = 64, height = 20, } renderer:render( n.paragraph { border_style = 'rounded', lines = { n.line(n.text('Foo', 'Keyword')), n.line(n.text('Bar', 'Keyword')), n.line(n.text('Qux', 'Keyword')), }, } )
By doing :setlocal list and :setlocal listchars=trail:~, it appears the line is padded with spaces, but there are 2 too many:
:setlocal list
:setlocal listchars=trail:~
Also, when truncate is set to true, the issue does not occur.
truncate
true
With no border, spacing is correct:
When adding a border, we get extra blank lines. I think there is an issue with width calculation causing the lines to wrap.
By doing
:setlocal list
and:setlocal listchars=trail:~
, it appears the line is padded with spaces, but there are 2 too many:Also, when
truncate
is set totrue
, the issue does not occur.