Radish alpha
r
Radicle terminal user interface
Radicle
Git (anonymous pull)
Log in to clone via SSH
lib: word wrapping on text views
✗ CI failure RadsammyT committed 1 month ago
commit 9629c6898539c0e9272c4426ca2a1b04d22f3d10
parent d4484a8c000a89a3b838d4cf3afcefa329ac1740
1 failed (1 total) View logs
1 file changed +3 -2
modified src/ui/widget.rs
@@ -8,7 +8,7 @@ use serde::{Deserialize, Serialize};
use ratatui::layout::{Alignment, Direction, Layout, Position, Rect};
use ratatui::style::{Style, Stylize};
use ratatui::text::{Line, Span, Text};
-
use ratatui::widgets::{Block, BorderType, Row, Scrollbar, ScrollbarOrientation, ScrollbarState};
+
use ratatui::widgets::{Block, BorderType, Row, Scrollbar, ScrollbarOrientation, ScrollbarState, Wrap};
use ratatui::Frame;
use ratatui::{layout::Constraint, widgets::Paragraph};

@@ -1029,7 +1029,8 @@ impl Widget for TextView<'_> {

        frame.render_stateful_widget(scroller, scroller_area, &mut scroller_state);
        frame.render_widget(
-
            Paragraph::new(self.text.clone()).scroll((self.cursor.x, self.cursor.y)),
+
            Paragraph::new(self.text.clone()).scroll((self.cursor.x, self.cursor.y))
+
            .wrap(Wrap { trim: false }),
            text_area,
        );
        if let Some(footer) = self.footer {