mirror of
https://github.com/TECHNOFAB11/tmux-copyrat.git
synced 2025-12-15 01:13:53 +01:00
refactor: refactor ui -> vc
This commit is contained in:
parent
ec03a71bfd
commit
de1aa3889c
3 changed files with 38 additions and 16 deletions
22
src/ui/mod.rs
Normal file
22
src/ui/mod.rs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
//! The `ui` module is responsible for presenting information to the user and
|
||||
//! handling keypresses.
|
||||
//!
|
||||
//! In particular, the `Ui` struct
|
||||
//!
|
||||
//! - renders text, matched text and hints from the structured buffer content
|
||||
//! to the screen,
|
||||
//! - listens for keypress events,
|
||||
//! - and returns the user selection in the form of a `Selection` struct.
|
||||
//!
|
||||
//! Via keypresses the user can
|
||||
//!
|
||||
//! - navigate the buffer (in case it is larger than the number of lines in
|
||||
//! the terminal)
|
||||
//! - move the focus from one match to another
|
||||
//! - select one of the matches
|
||||
//! - toggle the output destination (tmux buffer or clipboard)
|
||||
//!
|
||||
|
||||
mod vc;
|
||||
pub use vc::ViewController;
|
||||
pub use vc::{HintAlignment, HintStyle, UiColors};
|
||||
1163
src/ui/vc.rs
Normal file
1163
src/ui/vc.rs
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue