From dc2a26becf664ff0c252460c4d137d7b25cec651 Mon Sep 17 00:00:00 2001 From: Zach Nielsen Date: Wed, 20 Sep 2023 13:51:11 -0700 Subject: [PATCH] GH-183 - Abort search on error rather than continuing to loop. --- autoload/minimap/vim.vim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/autoload/minimap/vim.vim b/autoload/minimap/vim.vim index a886b58..a0d33fa 100644 --- a/autoload/minimap/vim.vim +++ b/autoload/minimap/vim.vim @@ -1011,8 +1011,9 @@ function! s:minimap_color_search_get_spans(win_info, query) abort continue endif if end_location[1] < start_location[1] - " Error - end not farther than start. Skip. - continue + " Error - end not farther than start. Abort. + echom 'Error looking for matches: end_location: [' . end_location[1] . '] is less than start_location: [' . start_location[1] . ']. Aborting' + break endif let match_len = end_location[1] - start_location[1] let this_location = {}