|
|
@ -497,7 +497,7 @@ impl EditorView {
|
|
|
|
use tui::{
|
|
|
|
use tui::{
|
|
|
|
layout::Alignment,
|
|
|
|
layout::Alignment,
|
|
|
|
text::Text,
|
|
|
|
text::Text,
|
|
|
|
widgets::{Paragraph, Widget},
|
|
|
|
widgets::{Paragraph, Widget, Wrap},
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
let cursor = doc
|
|
|
|
let cursor = doc
|
|
|
@ -529,8 +529,10 @@ impl EditorView {
|
|
|
|
lines.extend(text.lines);
|
|
|
|
lines.extend(text.lines);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
let paragraph = Paragraph::new(lines).alignment(Alignment::Right);
|
|
|
|
let paragraph = Paragraph::new(lines)
|
|
|
|
let width = 80.min(viewport.width);
|
|
|
|
.alignment(Alignment::Right)
|
|
|
|
|
|
|
|
.wrap(Wrap { trim: true });
|
|
|
|
|
|
|
|
let width = 100.min(viewport.width);
|
|
|
|
let height = 15.min(viewport.height);
|
|
|
|
let height = 15.min(viewport.height);
|
|
|
|
paragraph.render(
|
|
|
|
paragraph.render(
|
|
|
|
Rect::new(viewport.right() - width, viewport.y + 1, width, height),
|
|
|
|
Rect::new(viewport.right() - width, viewport.y + 1, width, height),
|
|
|
|