From 9c6fb736a0335b070564479a79b9360a63cf3c64 Mon Sep 17 00:00:00 2001 From: Christian Wellenbrock Date: Wed, 24 Apr 2019 22:37:46 +0200 Subject: [PATCH] Only consider targets with matching seek range If a range is not found in g:targets_seekRanges, don't consider it. Before it was still considered, just with the lowest possible score, so ranges from g:targets_seekRanges would be preferred, but it was impossible to actually limit the ranges. --- autoload/targets/multigen.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/targets/multigen.vim b/autoload/targets/multigen.vim index f9f0791..446bcf3 100644 --- a/autoload/targets/multigen.vim +++ b/autoload/targets/multigen.vim @@ -166,6 +166,6 @@ function! s:rangeScore(range) let s:rangeScores[ranges[i]] = rangesN - i endfor endif - return get(s:rangeScores, a:range) + return get(s:rangeScores, a:range, -1) endfunction