forked from aniani/vim
patch 8.2.0316: ex_getln.c code has insufficient test coverage
Problem: ex_getln.c code has insufficient test coverage. Solution: Add more tests. Fix a problem. (Yegappan Lakshmanan, closes #5693)
This commit is contained in:
@@ -389,7 +389,7 @@ calc_hist_idx(int histype, int num)
|
||||
i += hislen;
|
||||
wrapped = TRUE;
|
||||
}
|
||||
if (hist[i].hisnum == num && hist[i].hisstr != NULL)
|
||||
if (i >= 0 && hist[i].hisnum == num && hist[i].hisstr != NULL)
|
||||
return i;
|
||||
}
|
||||
else if (-num <= hislen)
|
||||
|
Reference in New Issue
Block a user