summaryrefslogtreecommitdiffstats
path: root/src/screen.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/screen.c')
-rw-r--r--src/screen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/screen.c b/src/screen.c
index ba964b4958..b1af862d37 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -7801,7 +7801,7 @@ next_search_hl_pos(shl, lnum, posmatch, mincol)
}
}
posmatch->cur = 0;
- if (shl->lnum == lnum)
+ if (shl->lnum == lnum && bot >= 0)
{
colnr_T start = posmatch->pos[bot].col == 0
? 0 : posmatch->pos[bot].col - 1;