summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <bram@vim.org>2015-01-27 20:59:31 +0100
committerBram Moolenaar <bram@vim.org>2015-01-27 20:59:31 +0100
commit5cdfb7d67d43ad72cdaff3f8c56ef1aa5c54c3e1 (patch)
tree119c4b3073580504a8d2c8798fddb62e448b478e
parentff81fbbf65919243c543cc754f0a3e24d91307e9 (diff)
downloadvim-5cdfb7d67d43ad72cdaff3f8c56ef1aa5c54c3e1.tar.gz
updated for version 7.4.606v7.4.606v7-4-606
Problem: May crash when using a small window. Solution: Avoid dividing by zero. (Christian Brabandt)
-rw-r--r--src/normal.c2
-rw-r--r--src/version.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/normal.c b/src/normal.c
index cb1a7d15..74a001e8 100644
--- 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
index 17e442f8..72d85b61 100644
--- 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,