From 6d1210ae5d7ed13f191ec212d71dc1d01dda7a51 Mon Sep 17 00:00:00 2001 From: Luc Hermitte Date: Thu, 29 Aug 2024 01:30:48 +0200 Subject: [PATCH] REFACT: Extract complex expression into variable --- autoload/lh/marker.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/lh/marker.vim b/autoload/lh/marker.vim index 9887b64..f9dc901 100644 --- a/autoload/lh/marker.vim +++ b/autoload/lh/marker.vim @@ -298,9 +298,9 @@ function! s:DoSelect(emo, emc, delete, position, mode) abort " {{{2 call search('\V'.substitute(a:emc, '.$', '\\zs\0', '')) " call confirm(matchstr(getline('.'), se). "\n".se, "&Ok", 1 ) if s:Select_or_Echo() " select! {{{4 + let is_not_empty = matchstr(getline('.'),'\V\%'.c.'c'.a:emo.'\zs\.\{-}\ze'.a:emc)!= '' if !a:delete && - \ (s:Select_Empty_Mark() || - \ (matchstr(getline('.'),'\V\%'.c.'c'.a:emo.'\zs\.\{-}\ze'.a:emc)!= '')) + \ (s:Select_Empty_Mark() || is_not_empty) " Case: Marker containing a tag, e.g.: «tag» " Treatment: The marker is selected, going into SELECT-mode return mode_prefix.select."\"