mirror of
https://github.com/TECHNOFAB11/tmux-copyrat.git
synced 2025-12-15 17:33:51 +01:00
refactor: move reverse into the State
This commit is contained in:
parent
56106f4e38
commit
7e96bef522
3 changed files with 45 additions and 33 deletions
|
|
@ -19,7 +19,7 @@ pub mod view;
|
|||
pub fn run(buffer: String, opt: &CliOpt) -> Option<(String, bool)> {
|
||||
let lines: Vec<&str> = buffer.split('\n').collect();
|
||||
|
||||
let mut state = state::State::new(&lines, &opt.alphabet, &opt.custom_regex);
|
||||
let mut state = state::State::new(&lines, &opt.alphabet, &opt.custom_regex, opt.reverse);
|
||||
|
||||
let hint_style = match &opt.hint_style {
|
||||
None => None,
|
||||
|
|
@ -37,7 +37,6 @@ pub fn run(buffer: String, opt: &CliOpt) -> Option<(String, bool)> {
|
|||
let selection: Option<(String, bool)> = {
|
||||
let mut viewbox = view::View::new(
|
||||
&mut state,
|
||||
opt.reverse,
|
||||
opt.unique_hint,
|
||||
&opt.hint_alignment,
|
||||
&opt.colors,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue