mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
updated for version 7.4.606
Problem: May crash when using a small window. Solution: Avoid dividing by zero. (Christian Brabandt)
This commit is contained in:
@@ -4457,6 +4457,8 @@ nv_screengo(oap, dir, dist)
|
|||||||
col_off2 = col_off1 - curwin_col_off2();
|
col_off2 = col_off1 - curwin_col_off2();
|
||||||
width1 = W_WIDTH(curwin) - col_off1;
|
width1 = W_WIDTH(curwin) - col_off1;
|
||||||
width2 = W_WIDTH(curwin) - col_off2;
|
width2 = W_WIDTH(curwin) - col_off2;
|
||||||
|
if (width2 == 0)
|
||||||
|
width2 = 1; /* avoid divide by zero */
|
||||||
|
|
||||||
#ifdef FEAT_VERTSPLIT
|
#ifdef FEAT_VERTSPLIT
|
||||||
if (curwin->w_width != 0)
|
if (curwin->w_width != 0)
|
||||||
|
@@ -741,6 +741,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
606,
|
||||||
/**/
|
/**/
|
||||||
605,
|
605,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user