mirror of
https://github.com/youwen5/iamb.git
synced 2025-06-20 05:39:52 -07:00
Update modalkit for newer ratatui and crossterm
This commit is contained in:
parent
9197864c5c
commit
95af00ba93
12 changed files with 221 additions and 183 deletions
|
@ -9,7 +9,7 @@ use modalkit::tui::{
|
|||
buffer::Buffer,
|
||||
layout::{Alignment, Rect},
|
||||
style::{Modifier as StyleModifier, Style},
|
||||
text::{Span, Spans},
|
||||
text::{Line, Span},
|
||||
widgets::{Paragraph, StatefulWidget, Widget},
|
||||
};
|
||||
use modalkit::widgets::{ScrollActions, TerminalCursor, WindowOps};
|
||||
|
@ -1226,7 +1226,7 @@ fn render_jump_to_recent(area: Rect, buf: &mut Buffer, focused: bool) -> Rect {
|
|||
Span::raw(" to jump to latest message"),
|
||||
];
|
||||
|
||||
Paragraph::new(Spans::from(msg))
|
||||
Paragraph::new(Line::from(msg))
|
||||
.alignment(Alignment::Center)
|
||||
.render(bar, buf);
|
||||
|
||||
|
@ -1342,7 +1342,7 @@ impl<'a> StatefulWidget for Scrollback<'a> {
|
|||
let x = area.left();
|
||||
|
||||
for (_, _, txt) in lines.into_iter() {
|
||||
let _ = buf.set_spans(x, y, &txt, area.width);
|
||||
let _ = buf.set_line(x, y, &txt, area.width);
|
||||
|
||||
y += 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue