From 448fac78a1b56aabce831234b4306cc9c2b42da8 Mon Sep 17 00:00:00 2001 From: Sergio Giraldo Date: Mon, 22 Apr 2024 14:51:34 +0200 Subject: [PATCH 1/2] feat: allow unselect item when in visual mode ::by sergio giraldo @ 20240422T1451CEST, gpg signed --- ITERATION | 1 + src/run.rs | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 ITERATION diff --git a/ITERATION b/ITERATION new file mode 100644 index 0000000..8acdd82 --- /dev/null +++ b/ITERATION @@ -0,0 +1 @@ +0.0.1 diff --git a/src/run.rs b/src/run.rs index 81a782c..9f4df66 100644 --- a/src/run.rs +++ b/src/run.rs @@ -331,6 +331,16 @@ fn _run(mut state: State, session_path: PathBuf) -> Result<(), FxError> { continue; } + //select-unselect, only in visual mode + KeyCode::Char(' ') => { + if state.v_start.is_some() { + let item = state.get_item_mut()?; + item.selected = !item.selected; + + state.redraw(state.layout.y); + } + } + //Go up. If lists exceed max-row, lists "scrolls" before the top of the list KeyCode::Char('j') | KeyCode::Down => { if let Some(start_pos) = state.v_start { From f9c47e3de9911d96de072e23371522cad5ed056a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Giraldo?= Date: Mon, 22 Apr 2024 15:29:22 +0200 Subject: [PATCH 2/2] Delete ITERATION file not needed --- ITERATION | 1 - 1 file changed, 1 deletion(-) delete mode 100644 ITERATION diff --git a/ITERATION b/ITERATION deleted file mode 100644 index 8acdd82..0000000 --- a/ITERATION +++ /dev/null @@ -1 +0,0 @@ -0.0.1