aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/diff.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/diff.c')
-rw-r--r--src/nvim/diff.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/nvim/diff.c b/src/nvim/diff.c
index aafd50687e..9cb0789400 100644
--- a/src/nvim/diff.c
+++ b/src/nvim/diff.c
@@ -1154,10 +1154,13 @@ void ex_diffoff(exarg_T *eap)
}
foldUpdateAll(wp);
-
- // make sure topline is not halfway through a fold
- changed_window_setting_win(wp);
}
+ // remove filler lines
+ wp->w_topfill = 0;
+
+ // make sure topline is not halfway a fold and cursor is
+ // invalidated
+ changed_window_setting_win(wp);
// Note: 'sbo' is not restored, it's a global option.
diff_buf_adjust(wp);