mirror of
https://github.com/neovim/neovim.git
synced 2025-09-18 17:28:23 +00:00
@@ -2877,8 +2877,11 @@ void ex_z(exarg_T *eap)
|
||||
if (end > curbuf->b_ml.ml_line_count)
|
||||
end = curbuf->b_ml.ml_line_count;
|
||||
|
||||
if (curs > curbuf->b_ml.ml_line_count)
|
||||
if (curs > curbuf->b_ml.ml_line_count) {
|
||||
curs = curbuf->b_ml.ml_line_count;
|
||||
} else if (curs < 1) {
|
||||
curs = 1;
|
||||
}
|
||||
|
||||
for (i = start; i <= end; i++) {
|
||||
if (minus && i == lnum) {
|
||||
@@ -2898,8 +2901,11 @@ void ex_z(exarg_T *eap)
|
||||
}
|
||||
}
|
||||
|
||||
curwin->w_cursor.lnum = curs;
|
||||
ex_no_reprint = TRUE;
|
||||
if (curwin->w_cursor.lnum != curs) {
|
||||
curwin->w_cursor.lnum = curs;
|
||||
curwin->w_cursor.col = 0;
|
||||
}
|
||||
ex_no_reprint = true;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user