Christian Brabandt wrote:

> On Fr, 11 Feb 2011, Bram Moolenaar wrote:
> 
> > 
> > Christian Brabandt wrote:
> > 
> > > this oneliner fixes this issue from the todo-list
> > > 
> > > ,----
> > > | When 'cursorcolumn' is set locally to a window, ":new" opens a window
> > > | with the same highlighting but 'cursorcolumn' is empty. (Tyru, 2010 Nov
> > > | 15)
> > > `----
> > 
> > Note that it should say 'colorcolumn' instead of 'cursorcolumn'.
> 
> Yes true. I find it confusing those two options with the similar names.
> 
> > I think the proper solution is to reset wp->w_p_cc_cols.  I don't quite
> > see why that doesn't happen, win_init() calls check_colorcolumn() after
> > the options have been set to empty.  Oh wait, the option is reset to the
> > global value somewhere later. That's where the call to
> > check_colorcolumn() is missing.
> 
> You mean in get_winopts() like this?
> 
> diff --git a/src/buffer.c b/src/buffer.c
> --- a/src/buffer.c
> +++ b/src/buffer.c
> @@ -2505,6 +2505,9 @@
>      wininfo_T  *wip;
> 
>      clear_winopt(&curwin->w_onebuf_opt);
> +#ifdef FEAT_SYN_HL
> +    check_colorcolumn(curwin);
> +#endif
>  #ifdef FEAT_FOLDING
>      clearFolding(curwin);
>  #endif

Moving it further down, after the copy_winopt() calls, is probably better.

-- 
hundred-and-one symptoms of being an internet addict:
244. You use more than 20 passwords.

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

Raspunde prin e-mail lui