Skip to content

Commit

Permalink
move history, suggest and mode into text_editor/ dir
Browse files Browse the repository at this point in the history
  • Loading branch information
ynqa committed Feb 14, 2024
1 parent 9a06c96 commit 80277d6
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
8 changes: 7 additions & 1 deletion src/core/text_editor.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
mod history;
pub use history::History;
mod render;
pub use render::{History, Mode, Renderer, Suggest};
pub use render::Renderer;
mod suggest;
pub use suggest::Suggest;
mod mode;
pub use mode::Mode;
mod build;
pub use build::Builder;

Expand Down
File renamed without changes.
9 changes: 9 additions & 0 deletions src/core/text_editor/mode.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/// Edit mode.
#[derive(Clone, Default)]
pub enum Mode {
#[default]
/// Insert a char at the current position.
Insert,
/// Overwrite a char at the current position.
Overwrite,
}
17 changes: 1 addition & 16 deletions src/core/text_editor/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,9 @@ use crate::{
grapheme::{matrixify, Graphemes},
pane::Pane,
render::{AsAny, Renderable, State},
text_editor::TextEditor,
text_editor::{History, Mode, Suggest, TextEditor},
};

mod history;
pub use history::History;
mod suggest;
pub use suggest::Suggest;

/// Edit mode.
#[derive(Clone, Default)]
pub enum Mode {
#[default]
/// Insert a char at the current position.
Insert,
/// Overwrite a char at the current position.
Overwrite,
}

#[derive(Clone)]
pub struct Renderer {
pub texteditor: TextEditor,
Expand Down
File renamed without changes.

0 comments on commit 80277d6

Please sign in to comment.