Skip to content

Commit 12dcef1

Browse files
brammooldouglaskayama
authored andcommitted
updated for version 7.4.606
Problem: May crash when using a small window. Solution: Avoid dividing by zero. (Christian Brabandt)
1 parent 34807a0 commit 12dcef1

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

src/normal.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4457,6 +4457,8 @@ nv_screengo(oap, dir, dist)
44574457
col_off2 = col_off1 - curwin_col_off2();
44584458
width1 = W_WIDTH(curwin) - col_off1;
44594459
width2 = W_WIDTH(curwin) - col_off2;
4460+
if (width2 == 0)
4461+
width2 = 1; /* avoid divide by zero */
44604462

44614463
#ifdef FEAT_VERTSPLIT
44624464
if (curwin->w_width != 0)

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,8 @@ static char *(features[]) =
741741

742742
static int included_patches[] =
743743
{ /* Add new patch number below this line */
744+
/**/
745+
606,
744746
/**/
745747
605,
746748
/**/

0 commit comments

Comments
 (0)