I actually did implement it as a window-local option; see #3535. Let me
know if that looks good. :)

On Fri, Oct 12, 2018, 3:48 PM Bram Moolenaar <[email protected]>
wrote:

>
> > How about I do it like I said before, calling it `diffref` instead of
> > `diffmaster` and having it be on by default and settable on multiple
> > buffers at once, but then I also add `diffmaster` as a command that
> > turns it on for the current buffer and off for all others? That way it's
> > just as easy as before to use it for that most common use case of only
> > comparing with a single buffer, but at the same time if someone does
> > ever get the need to turn it on for multiple (but not all) buffers, they
> > can do that too? From my understanding of the way it's coded, it would
> > be no more difficult than only allowing a single master (actually less
> > difficult because I won't need to have it check other buffers when you
> > set the variable) so it would be a shame to explicitly remove that
> > functionality if there's another way to get the ease of use it would
> > bring.
>
> I have a hard time imagining how it would be used, have 'diffref' in
> one window/buffer to be different from another one. What are you
> looking at then?
>
> > Also you know the code a lot more than I do, but I'm pretty sure it
> > actually would be a buffer option, not a window option. It's the
> > buffer that it compares against. If two windows have the same buffer,
> > what difference would it make which of the two is set as the master?
> > The `diff` option is window-specific because it's specific to the way
> > that window is treated, but the `diffref` or `diffmaster` option,
> > whatever it's called, doesn't really involve the window; it just tells
> > other windows whether or not to reference the buffer inside.
>
> One of the most common things to do is the disable 'diff' and switch it
> on in another window. What would then happen with the buffer-local
> option? Having 'diffref' set in a buffer that doesn't appear in any
> window with 'diff' set is like a misconfiguration. We should try to
> avoid that from happening. Also, setting it for a hidden buffer doesn't
> make sense.
>
> It's true that setting the option really means to use the buffer in that
> window as the master. I don't see a problem with that.
>
> Gary's remark also mentions a situation where a window-local option is
> needed.
>
> --
> hundred-and-one symptoms of being an internet addict:
> 190. You quickly hand over your wallet, leather jacket, and car keys
> during a mugging, then proceed to beat the crap out of your
> assailant when he asks for your laptop.
>
> /// 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 are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <https://github.com/vim/vim/pull/3527#issuecomment-429442676>
>
> --
> --
> 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 a topic in the
> Google Groups "vim_dev" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/vim_dev/9CwgjallJDg/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
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.

Raspunde prin e-mail lui