Patch 7.4.2275
Problem: ":diffoff!" does not remove filler lines.
Solution: Force a redraw and invalidate the cursor. (closes #1014)
Files: src/diff.c, src/testdir/test_diffmode.vim
*** ../vim-7.4.2274/src/diff.c 2016-07-31 14:17:22.903502231 +0200
--- src/diff.c 2016-08-27 22:29:44.029348672 +0200
***************
*** 1236,1245 ****
: wp->w_p_fen_save;
foldUpdateAll(wp);
- /* make sure topline is not halfway a fold */
- changed_window_setting_win(wp);
#endif
}
/* Note: 'sbo' is not restored, it's a global option. */
diff_buf_adjust(wp);
--- 1236,1249 ----
: wp->w_p_fen_save;
foldUpdateAll(wp);
#endif
}
+ /* 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);
*** ../vim-7.4.2274/src/testdir/test_diffmode.vim 2016-07-30
19:11:21.035200855 +0200
--- src/testdir/test_diffmode.vim 2016-08-27 22:20:56.873845352 +0200
***************
*** 202,204 ****
--- 202,220 ----
bwipe!
enew!
endfunc
+
+ func Test_diffoff()
+ enew!
+ call setline(1, ['Two', 'Three'])
+ let normattr = screenattr(1, 1)
+ diffthis
+ botright vert new
+ call setline(1, ['One', '', 'Two', 'Three'])
+ diffthis
+ redraw
+ diffoff!
+ redraw
+ call assert_equal(normattr, screenattr(1, 1))
+ bwipe!
+ bwipe!
+ endfunc
*** ../vim-7.4.2274/src/version.c 2016-08-27 21:55:09.791084243 +0200
--- src/version.c 2016-08-27 22:40:30.367820117 +0200
***************
*** 765,766 ****
--- 765,768 ----
{ /* Add new patch number below this line */
+ /**/
+ 2275,
/**/
--
>From "know your smileys":
:-D Big smile
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.