diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/drawscreen.c | 2 | ||||
-rw-r--r-- | src/nvim/edit.c | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/nvim/drawscreen.c b/src/nvim/drawscreen.c index fd1589f0c5..85f62db774 100644 --- a/src/nvim/drawscreen.c +++ b/src/nvim/drawscreen.c @@ -2644,6 +2644,8 @@ int number_width(win_T *wp) /// e.g. if must_redraw is UPD_CLEAR, type UPD_NOT_VALID will do nothing. void redraw_later(win_T *wp, int type) { + // curwin may have been set to NULL when exiting + assert(wp != NULL || exiting); if (!exiting && wp->w_redr_type < type) { wp->w_redr_type = type; if (type >= UPD_NOT_VALID) { diff --git a/src/nvim/edit.c b/src/nvim/edit.c index dd7cd9a573..ba2885a162 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -444,8 +444,11 @@ static int insert_check(VimState *state) // is detected when the cursor column is smaller after inserting something. // Don't do this when the topline changed already, it has already been // adjusted (by insertchar() calling open_line())). + // Also don't do this when 'smoothscroll' is set, as the window should then + // be scrolled by screen lines. if (curbuf->b_mod_set && curwin->w_p_wrap + && !curwin->w_p_sms && !s->did_backspace && curwin->w_topline == s->old_topline && curwin->w_topfill == s->old_topfill) { |