The diffoff! and diffoff commands both reset options in the window they are
called from without checking the value of &diff. The options which the commands
reset are: diff, scrollbind, cursorbind, scrollopt, wrap, foldmethod,
foldcolumn. Here are 2 examples using the wrap option, after starting with
vim -n -u NONE -U NONE -i NONE --noplugin
set nowrap
set wrap ? | echon " " bufnr("%")
diffoff
set wrap ? | echon " " bufnr("%")
set nowrap
silent edit a | silent diffsplit b | silent split c
set wrap ? | echon " " bufnr("%")
diffoff!
set wrap ? | echon " " bufnr("%")
patch inline and attached
*** old/diff.c Thu Jul 18 12:11:03 2013
--- new/diff.c Wed Sep 18 12:10:14 2013
***************
*** 1203,1209 ****
for (wp = firstwin; wp != NULL; wp = wp->w_next)
{
! if (wp == curwin || (eap->forceit && wp->w_p_diff))
{
/* Set 'diff', 'scrollbind' off and 'wrap' on. If option values
* were saved in diff_win_options() restore them. */
--- 1203,1209 ----
for (wp = firstwin; wp != NULL; wp = wp->w_next)
{
! if ((wp == curwin || eap->forceit) && wp->w_p_diff)
{
/* Set 'diff', 'scrollbind' off and 'wrap' on. If option values
* were saved in diff_win_options() restore them. */
--
--
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/groups/opt_out.
*** old/diff.c Thu Jul 18 12:11:03 2013
--- new/diff.c Wed Sep 18 12:10:14 2013
***************
*** 1203,1209 ****
for (wp = firstwin; wp != NULL; wp = wp->w_next)
{
! if (wp == curwin || (eap->forceit && wp->w_p_diff))
{
/* Set 'diff', 'scrollbind' off and 'wrap' on. If option values
* were saved in diff_win_options() restore them. */
--- 1203,1209 ----
for (wp = firstwin; wp != NULL; wp = wp->w_next)
{
! if ((wp == curwin || eap->forceit) && wp->w_p_diff)
{
/* Set 'diff', 'scrollbind' off and 'wrap' on. If option values
* were saved in diff_win_options() restore them. */