From e3bdb745bfbaed55b8b2dc5d870b0b29fb9aeb24 Mon Sep 17 00:00:00 2001 From: Austen Adler Date: Thu, 11 Aug 2022 17:37:08 -0400 Subject: [PATCH] Cleanup invert --- src/invert.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/invert.rs b/src/invert.rs index 8c950ed..648bd3a 100644 --- a/src/invert.rs +++ b/src/invert.rs @@ -23,7 +23,7 @@ pub fn invert(_options: &Options) -> Result { let mut ret = get_selections_desc(Some("%"))?; ret.sort(); ret.into_iter() - // dd - The full row selectiondesc, spanning from col 1 to the rightmost col + // dd - The full row selectiondesc, spanning from col 1 to the rightmost col, for every row in the file .map(|dd: SelectionDesc| { // For every line, if there are selections to subtract, subtract them all match split_selections_desc @@ -47,7 +47,10 @@ pub fn invert(_options: &Options) -> Result { kakplugin::cmd("exec ''")?; - Ok(format!("Invert {} selections", 0)) + Ok(format!( + "Inverted {} selections", + split_selections_desc.len() + )) } /// Subtract an iterator of `SelectionDesc`s from a given SelectionDesc