mirror of
https://github.com/TECHNOFAB11/tmux-copyrat.git
synced 2025-12-12 16:10:07 +01:00
refactor: outputdestination.rs -> comm/output_destination.rs
This commit is contained in:
parent
9426d8bfee
commit
16fa4d45c1
6 changed files with 12 additions and 5 deletions
|
|
@ -2,7 +2,12 @@ use clap::Clap;
|
|||
use std::collections::HashMap;
|
||||
use std::str::FromStr;
|
||||
|
||||
use copyrat::{comm::tmux, error, output_destination::OutputDestination, ui::Selection, CliOpt};
|
||||
use copyrat::{
|
||||
comm::{tmux, OutputDestination},
|
||||
error,
|
||||
ui::Selection,
|
||||
CliOpt,
|
||||
};
|
||||
|
||||
/// Main configuration, parsed from command line.
|
||||
#[derive(Clap, Debug)]
|
||||
|
|
|
|||
|
|
@ -1 +1,4 @@
|
|||
mod output_destination;
|
||||
pub mod tmux;
|
||||
|
||||
pub use output_destination::OutputDestination;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
pub mod comm;
|
||||
pub mod error;
|
||||
pub mod output_destination;
|
||||
pub mod textbuf;
|
||||
pub mod ui;
|
||||
|
||||
|
|
@ -40,7 +39,7 @@ pub fn run(buffer: String, opt: &CliOpt) -> Option<ui::Selection> {
|
|||
},
|
||||
};
|
||||
|
||||
let default_output_destination = output_destination::OutputDestination::Tmux;
|
||||
let default_output_destination = comm::OutputDestination::Tmux;
|
||||
|
||||
let selection: Option<ui::Selection> = {
|
||||
let mut ui = ui::ViewController::new(
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
use crate::output_destination::OutputDestination;
|
||||
use crate::comm::OutputDestination;
|
||||
|
||||
/// Represents the text selected by the user, along with if it was uppercased
|
||||
/// and the output destination (Tmux buffer or Clipboard).
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ use termion::{self, color, cursor, event, style};
|
|||
use super::colors::UiColors;
|
||||
use super::Selection;
|
||||
use super::{HintAlignment, HintStyle};
|
||||
use crate::{output_destination::OutputDestination, textbuf};
|
||||
use crate::{comm::OutputDestination, textbuf};
|
||||
|
||||
pub struct ViewController<'a> {
|
||||
model: &'a mut textbuf::Model<'a>,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue