Skip to content

Commit

Permalink
GH-183 - Abort search on error rather than continuing to loop.
Browse files Browse the repository at this point in the history
  • Loading branch information
ZNielsen committed Sep 20, 2023
1 parent 74573b6 commit 32da88e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions autoload/minimap/vim.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {}
Expand Down

0 comments on commit 32da88e

Please sign in to comment.