neo-blessed
neo-blessed copied to clipboard
Multiple lines inside a list?
Hello. I can use the following code to create a list
messagelist =
blessed.list({
parent:screen,
label:'{bold}{cyan-fg}#' + channel.name + '{/cyan-fg}{/bold}',
tags:true,
border:'line',
width:"100%",
top:0,
left:0,
bottom:1,
mouse:true,
scrollbar:{
ch:'',
track:{
bg:'cyan'
},
style:{
inverse:true
}
},
style:{
item:{
hover:{
bg:'blue'
}
},
selected:{
bg:'blue',
bold:true
}
},
items:[
"Connected to channel " + channel.name + " (id:" + channel.id + ")"
]
});
And it works well. Now, if I append messages/items to this thing, if it has many newlines, it just gets truncated. Furthermore, if the text is simply too long, it just gets truncated there as well..
Is there something I'm missing, or an option I haven't heard about? Right now the only option I have is to split up the list elements if they go above the threshold...
Many thanks.