Hi Bram,

2017年1月14日土曜日 23時21分21秒 UTC+9 Bram Moolenaar:
> Hirohito Higashi wrote:
> 
> > Hi Bram,
> > 
> > 2017-1-14(Sat) 22:54:57 UTC+9 Bram Moolenaar:
> > > Patch 8.0.0181
> > > Summary:    with cursorbind set cursor column highlighting is off
> > > Problem:    When 'cursorbind' and 'cursorcolumn' are both on, the column
> > >             highlignt in non-current windows is wrong.
> > > Solution:   Add validate_cursor(). (Masanori Misono, closes #1372)
> > > Files:      src/move.c
> > > 
> > > 
> > > *** ../vim-8.0.0180/src/move.c    2016-11-06 15:25:37.693627473 +0100
> > > --- src/move.c    2017-01-12 22:32:01.408155308 +0100
> > > ***************
> > > *** 2841,2846 ****
> > > --- 2841,2850 ----
> > >               restart_edit_save = restart_edit;
> > >               restart_edit = TRUE;
> > >               check_cursor();
> > > + # ifdef FEAT_SYN_HL
> > > +             if (curwin->w_p_cuc)
> > > +                 validate_cursor();
> > > + # endif
> > >               restart_edit = restart_edit_save;
> > >   # ifdef FEAT_MBYTE
> > >               /* Correct cursor for multi-byte character. */
> > > *** ../vim-8.0.0180/src/version.c 2017-01-14 14:36:03.229775080 +0100
> > > --- src/version.c 2017-01-14 14:53:33.111310935 +0100
> > > ***************
> > > *** 766,767 ****
> > > --- 766,769 ----
> > >   {   /* Add new patch number below this line */
> > > + /**/
> > > +     181,
> > >   /**/
> > 
> > Is the following patch correct?
> > https://groups.google.com/d/msg/vim_dev/afsWQ48bfn0/xF-mCefjBwAJ
> 
> It works for me.
> 
> -- 
> God made the integers; all else is the work of Man.
>               -- Kronecker
> 
>  /// 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    ///


If we only set cursorbind and cursorline only, validate_cursor() is not called.
Maybe we need to do something like following:

diff --git a/src/move.c b/src/move.c
index 86b19aafc..ff522c02c 100644
--- a/src/move.c
+++ b/src/move.c
@@ -2841,10 +2841,12 @@ do_check_cursorbind(void)
            restart_edit_save = restart_edit;
            restart_edit = TRUE;
            check_cursor();
+           if (curwin->w_p_crb
 # ifdef FEAT_SYN_HL
-           if (curwin->w_p_cuc)
-               validate_cursor();
+              || curwin->w_p_cuc
 # endif
+              )
+               validate_cursor();
            restart_edit = restart_edit_save;
 # ifdef FEAT_MBYTE
            /* Correct cursor for multi-byte character. */


-- 
Best regards,
Masanori Misono

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