mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:7.4.606 #2594
Problem: May crash when using a small window. Solution: Avoid dividing by zero. (Christian Brabandt) https://github.com/vim/vim/commit/v7-4-606
This commit is contained in:
parent
d956535307
commit
48bd94e98f
@ -3399,6 +3399,10 @@ static bool nv_screengo(oparg_T *oap, int dir, long dist)
|
||||
width1 = curwin->w_width - col_off1;
|
||||
width2 = curwin->w_width - col_off2;
|
||||
|
||||
if (width2 == 0) {
|
||||
width2 = 1; // Avoid divide by zero.
|
||||
}
|
||||
|
||||
if (curwin->w_width != 0) {
|
||||
/*
|
||||
* Instead of sticking at the last character of the buffer line we
|
||||
|
@ -177,7 +177,7 @@ static int included_patches[] = {
|
||||
//609,
|
||||
//608,
|
||||
//607,
|
||||
//606,
|
||||
606,
|
||||
//605,
|
||||
//604,
|
||||
//603,
|
||||
|
Loading…
Reference in New Issue
Block a user