From 9bd2f6fef0d835ffb97e18993161e6639c98d2d1 Mon Sep 17 00:00:00 2001 From: lukeflo Date: Mon, 30 Jun 2025 21:49:53 +0200 Subject: align resource symbols, update README --- src/app.rs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/app.rs') diff --git a/src/app.rs b/src/app.rs index 18a97e6..f912614 100644 --- a/src/app.rs +++ b/src/app.rs @@ -16,15 +16,14 @@ ///// use crate::bibiman::CurrentArea; -use crate::config::BibiConfig; -use color_eyre::eyre::{Context, Ok, Result}; -use editor_command::EditorBuilder; -// use super::Event; use crate::cliargs::CLIArgs; +use crate::config::BibiConfig; use crate::tui::commands::InputCmdAction; use crate::tui::popup::PopupKind; use crate::tui::{self, Tui}; use crate::{bibiman::Bibiman, tui::commands::CmdAction}; +use color_eyre::eyre::{Context, Ok, Result}; +use crossterm::event::KeyCode; use std::ffi::OsStr; use std::path::PathBuf; use std::process::{Command, Stdio}; @@ -84,6 +83,12 @@ impl App { self.bibiman.popup_area.popup_kind { self.bibiman.fast_selection(cfg, &mut tui, key_event.code)?; + // if a fast match char was used, restart event-loop. + // otherwise, the fast match char will be executed as command + match key_event.code { + KeyCode::Char('o' | 'l' | 'n' | 'y') => continue, + _ => {} + } } let command = if self.input_mode { CmdAction::Input(InputCmdAction::parse(key_event, &self.input)) -- cgit v1.2.3