diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-07-02 12:25:07 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-02 12:25:07 +0800 |
| commit | a9de89894a2ff43dd511b38f20ab2815d6c7e2bd (patch) | |
| tree | 8c6da1a08e4bb88f876e93bb6fc6d24461cff93e /src/nvim/ex_getln.c | |
| parent | f71d518c90b46dd7c53d151a59ff9a5236589f64 (diff) | |
| parent | 727754377281aa442767c0ad9c25fec7dd2533ab (diff) | |
| download | rneovim-a9de89894a2ff43dd511b38f20ab2815d6c7e2bd.tar.gz rneovim-a9de89894a2ff43dd511b38f20ab2815d6c7e2bd.tar.bz2 rneovim-a9de89894a2ff43dd511b38f20ab2815d6c7e2bd.zip | |
Merge pull request #19202 from zeertzjq/vim-8.2.0316
vim-patch:8.2.{0261,0316}: insufficient test coverage
Diffstat (limited to 'src/nvim/ex_getln.c')
| -rw-r--r-- | src/nvim/ex_getln.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c index 49f946d6c0..1982b2dace 100644 --- a/src/nvim/ex_getln.c +++ b/src/nvim/ex_getln.c @@ -6293,7 +6293,7 @@ static int calc_hist_idx(int histype, int num) 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) { |
