Skip to content

Commit

Permalink
derive Debug for TextArea struct (fixes #23)
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysd committed Oct 1, 2023
1 parent 502a3a7 commit 5725e70
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/history.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::collections::VecDeque;

#[derive(Clone)]
#[derive(Clone, Debug)]
pub enum EditKind {
InsertChar(char, usize),
DeleteChar(char, usize),
Expand Down Expand Up @@ -54,7 +54,7 @@ impl EditKind {
}
}

#[derive(Clone)]
#[derive(Clone, Debug)]
pub struct Edit {
kind: EditKind,
cursor_before: (usize, usize),
Expand Down Expand Up @@ -93,7 +93,7 @@ impl Edit {
}
}

#[derive(Clone)]
#[derive(Clone, Debug)]
pub struct History {
index: usize,
max_items: usize,
Expand Down
2 changes: 1 addition & 1 deletion src/textarea.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ use crate::word::{find_word_end_forward, find_word_start_backward};
/// // Get lines as String.
/// println!("Lines: {:?}", textarea.lines());
/// ```
#[derive(Clone)]
#[derive(Clone, Debug)]
pub struct TextArea<'a> {
lines: Vec<String>,
block: Option<Block<'a>>,
Expand Down
2 changes: 1 addition & 1 deletion src/widget.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use std::sync::atomic::{AtomicU64, Ordering};
// point we stick with using `tui::terminal::Frame::render_widget` because it is simpler API. Users don't need to
// manage states of textarea instances separately.
// https://docs.rs/tui/latest/tui/terminal/struct.Frame.html#method.render_stateful_widget
#[derive(Default)]
#[derive(Default, Debug)]
pub struct Viewport(AtomicU64);

impl Clone for Viewport {
Expand Down

0 comments on commit 5725e70

Please sign in to comment.