1
0
forked from aniani/vim

patch 9.0.1367: divide by zero in zero-width window

Problem:    Divide by zero in zero-width window.
Solution:   Check the width is positive.
This commit is contained in:
Bram Moolenaar
2023-03-01 17:55:31 +00:00
parent ad60898aa4
commit e0f8691969
3 changed files with 32 additions and 11 deletions

View File

@@ -1734,7 +1734,7 @@ scrolldown(
col -= width1;
++row;
}
if (col > width2)
if (col > width2 && width2 > 0)
{
row += col / width2;
col = col % width2;