mirror of
https://github.com/TECHNOFAB11/tmux-copyrat.git
synced 2025-12-14 17:03:50 +01:00
refactor: selection.rs -> ui/selection.rs
This commit is contained in:
parent
748da3ae72
commit
a5e3ed263c
6 changed files with 10 additions and 6 deletions
|
|
@ -18,7 +18,9 @@
|
|||
//!
|
||||
|
||||
pub mod colors;
|
||||
mod selection;
|
||||
mod vc;
|
||||
|
||||
pub use selection::Selection;
|
||||
pub use vc::ViewController;
|
||||
pub use vc::{HintAlignment, HintStyle};
|
||||
|
|
|
|||
9
src/ui/selection.rs
Normal file
9
src/ui/selection.rs
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
use crate::output_destination::OutputDestination;
|
||||
|
||||
/// Represents the text selected by the user, along with if it was uppercased
|
||||
/// and the output destination (Tmux buffer or Clipboard).
|
||||
pub struct Selection {
|
||||
pub text: String,
|
||||
pub uppercased: bool,
|
||||
pub output_destination: OutputDestination,
|
||||
}
|
||||
|
|
@ -8,8 +8,9 @@ use sequence_trie::SequenceTrie;
|
|||
use termion::{self, color, cursor, event, style};
|
||||
|
||||
use super::colors::UiColors;
|
||||
use super::Selection;
|
||||
use crate::error::ParseError;
|
||||
use crate::{model, output_destination::OutputDestination, selection::Selection};
|
||||
use crate::{model, output_destination::OutputDestination};
|
||||
|
||||
pub struct ViewController<'a> {
|
||||
model: &'a mut model::Model<'a>,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue