From 7629176fb11be234882c64e3bf92d97839301fe4 Mon Sep 17 00:00:00 2001 From: lonerover Date: Tue, 7 Feb 2017 15:46:19 +0800 Subject: vim-patch:7.4.2275 Problem: ":diffoff!" does not remove filler lines. Solution: Force a redraw and invalidate the cursor. (closes vim/vim#1014) https://github.com/vim/vim/commit/e67d546f3c691139e6d3d33f36724d98aec04c14 --- src/nvim/diff.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/nvim/diff.c') 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); -- cgit