making sure that select marks were set before attempting to extract text

This commit is contained in:
dsych 2021-01-15 23:06:35 -05:00 committed by Ben Jackson
commit 0ff9dc5f9e

View file

@ -532,6 +532,10 @@ function! vimspector#ShowTooltipForSelection() range abort
" retrive the lines selected in visual mode
let lines = getbufline(bufnr('%'), start[0], end[0])
if(len(lines) < 1)
return
endif
" make sure the leave only the parts we care about if multiple lines are
" selected
let lines[0] = strcharpart(lines[0], start[1])