]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
updated for version 7.4.606 v7.4.606
authorBram Moolenaar <Bram@vim.org>
Tue, 27 Jan 2015 19:59:31 +0000 (20:59 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 27 Jan 2015 19:59:31 +0000 (20:59 +0100)
Problem:    May crash when using a small window.
Solution:   Avoid dividing by zero. (Christian Brabandt)

src/normal.c
src/version.c

index cb1a7d154ad7c854886527695c5c9a8d9b8bd5bb..74a001e82395e776a5fa8538c115754743f8ea87 100644 (file)
@@ -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)
index 17e442f8a2afa5191e15dadbea553f124e2c3d5e..72d85b618406b51e5f4329cf8f603ed0d6e95b5c 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    606,
 /**/
     605,
 /**/