aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/diff.c
diff options
context:
space:
mode:
authorlonerover <pathfinder1644@yahoo.com>2017-02-07 15:46:19 +0800
committerlonerover <pathfinder1644@yahoo.com>2017-02-07 15:47:28 +0800
commit7629176fb11be234882c64e3bf92d97839301fe4 (patch)
treed6dd072d65f1d231b2c6a976eeaa38cb260992f6 /src/nvim/diff.c
parentcca8d2751a238b7f64eec80fc74e786d358642ce (diff)
downloadrneovim-7629176fb11be234882c64e3bf92d97839301fe4.tar.gz
rneovim-7629176fb11be234882c64e3bf92d97839301fe4.tar.bz2
rneovim-7629176fb11be234882c64e3bf92d97839301fe4.zip
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
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);