From b5e3ec2c5a5b7f1552f191c06d5fb6b92570d50b Mon Sep 17 00:00:00 2001 From: rbong Date: Wed, 25 Sep 2024 10:43:18 -0400 Subject: [PATCH] Fix range error in neovim tests --- autoload/flog/test.vim | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/autoload/flog/test.vim b/autoload/flog/test.vim index 940e534..72aef92 100644 --- a/autoload/flog/test.vim +++ b/autoload/flog/test.vim @@ -21,9 +21,11 @@ function! flog#test#ShowNvimBufHl() abort let l:start_virtcol = virtcol([l:row + 1, l:start_col]) let l:end_virtcol = virtcol([l:row + 1, l:details.end_col]) - 1 - for l:virtcol in range(l:start_virtcol, l:end_virtcol) - let l:hl_groups[l:virtcol] = l:details.hl_group - endfor + if l:end_virtcol > l:start_virtcol + for l:virtcol in range(l:start_virtcol, l:end_virtcol) + let l:hl_groups[l:virtcol] = l:details.hl_group + endfor + endif endfor " Build output