feat: add focus wrap around

This commit is contained in:
graelo 2020-06-01 10:06:50 +02:00
parent 8464c451e3
commit b223e280f1
2 changed files with 31 additions and 5 deletions

View file

@ -44,6 +44,7 @@ pub fn run(buffer: String, opt: &CliOpt) -> Option<(String, bool)> {
let mut viewbox = view::View::new(
&mut model,
opt.unique_hint,
opt.focus_wrap_around,
&opt.hint_alignment,
&opt.colors,
hint_style,
@ -95,6 +96,10 @@ pub struct CliOpt {
#[clap(short = "a", long, arg_enum, default_value = "leading")]
hint_alignment: view::HintAlignment,
/// Move focus back to first/last match.
#[clap(long)]
focus_wrap_around: bool,
/// Optional hint styling.
///
/// Underline or surround the hint for increased visibility.