Re: Does b:undo_ftplugin actually work?
- Christian Brabandt wrote:
> On Do, 15 Nov 2012, Bram Moolenaar wrote:I'll try it out. Why BCO_ENTER and not BCO_ALWAYS, as it's used in the
> > I finally had time to look into this patch. It breaks the tests in a
> > nasty way. Thus this is not the right solution. Instead of freeing the
> > options they should be initialized to the global values.
> > Perhaps setting buf->b_p_initialized to FALSE works?
> Unfortunately, that doesn't work.
> --git a/src/buffer.c b/src/buffer.c
> --- a/src/buffer.c
> +++ b/src/buffer.c
> @@ -1703,6 +1703,7 @@
> /* buf->b_nwindows = 0; why was this here? */
> free_buffer_stuff(buf, FALSE); /* delete local variables et al. */
> buf->b_p_initialized = FALSE;
> + buf_copy_options(buf, BCO_ENTER);
> #ifdef FEAT_KEYMAP
> /* need to reload lmaps and set b:keymap_name */
> curbuf->b_kmap_state |= KEYMAP_INIT;
> This also seems to work.
If you put 7 of the most talented OSS developers in a room for a week
and asked them to fix a bug in a spreadsheet program, in 1 week
you'd have 2 new mail readers and a text-based web browser.
/// Bram Moolenaar -- Bram@... -- 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