Kartik Agaram wrote:
> A coworker pointed out that part of the window-local example in ":help
> local-options" is no longer accurate.
>
> :e one
> :set list
> :e two
> Now the 'list' option will also be set in "two", since with the ":set list"
> command you have also set the global value. >
> :set nolist
> :e one
> :setlocal list
> :e two
> Now the 'list' option is not set, because ":set nolist" resets the global
> value, ":setlocal list" only changes the local value and ":e two" gets the
> global value.
>
> So far so good, but now:
>
> Note that if you do this next: >
> :e one
> You will not get back the 'list' value as it was the last time you edited
> "one". The options local to a window are not remembered for each buffer.
>
> This seems no longer to be true; the previous buffer does indeed seem to
> remember its 'list' setting. Did the behavior change at some point?
>
> The existing behavior seems superior, so here's a patch to delete that last
> note and bring the docs in sync.
Instead of deleting the text, let's correct it. And add useful
information about when the options are kept. Please check if this
actually works this way (I'm too lazy :-).
Now the 'list' option is not set, because ":set nolist" resets the global
value, ":setlocal list" only changes the local value and ":e two" gets the
global value. Note that if you do this next: >
:e one
You will get back the 'list' value as it was the last time you edited "one".
The options local to a window are remembered for each buffer. This also
happens when the buffer is not loaded, but they are lost when the buffer is
wiped out |:bwipe|.
--
hundred-and-one symptoms of being an internet addict:
240. You think Webster's Dictionary is a directory of WEB sites.
/// 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/groups/opt_out.