# HG changeset patch # User Bram Moolenaar # Date 1422388771 -3600 # Node ID 22f164bd7e8ea7de1e4c2a41020dde971112b862 # Parent 27aff52a3989a455c8df18d81d2a5e79a6e57795 updated for version 7.4.606 Problem: May crash when using a small window. Solution: Avoid dividing by zero. (Christian Brabandt) diff --git a/src/normal.c b/src/normal.c --- a/src/normal.c +++ b/src/normal.c @@ -4457,6 +4457,8 @@ nv_screengo(oap, dir, dist) col_off2 = col_off1 - curwin_col_off2(); width1 = W_WIDTH(curwin) - col_off1; width2 = W_WIDTH(curwin) - col_off2; + if (width2 == 0) + width2 = 1; /* avoid divide by zero */ #ifdef FEAT_VERTSPLIT if (curwin->w_width != 0) diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -742,6 +742,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 606, +/**/ 605, /**/ 604,