Loading ...
Sorry, an error occurred while loading the content.

53678Re: [PATCH] :diffoff should not change settings for non-diff windows

Expand Messages
  • Bram Moolenaar
    Mar 3, 2009
    • 0 Attachment
      Lech Lorens wrote:

      > The solution seems so easy, that I suspect that I might have fixed
      > behaviour that is actually desired. However, for me it always seemed
      > that :diffoff should only act on windows, that have 'diff' set, not ALL
      > windows in the current tab. The attached patch makes Vim behave so.

      The current behavior is intentional. A user may first do ":set nodiff"
      and discover that other things were not reset. Then ":diffoff" should
      get rid of the rest.

      However, perhaps it should do this unconditionally for the current
      window only. For other windows it makes more sense to check the 'diff'

      > - if (wp == curwin || eap->forceit)
      > + if (wp == curwin || (wp->w_p_diff && eap->forceit))

      How about that?

      hundred-and-one symptoms of being an internet addict:
      160. You get in the elevator and double-click the button for the floor
      you want.

      /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
      /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
      \\\ download, build and distribute -- http://www.A-A-P.org ///
      \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

      You received this message from the "vim_dev" maillist.
      For more information, visit http://www.vim.org/maillist.php
    • Show all 13 messages in this topic