Patch 8.0.0181

48 views
Skip to first unread message

Bram Moolenaar

unread,
Jan 14, 2017, 8:54:57 AM1/14/17
to vim...@googlegroups.com

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

--
ARTHUR: This new learning amazes me, Sir Bedevere. Explain again how sheep's
bladders may be employed to prevent earthquakes.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

/// Bram Moolenaar -- Br...@Moolenaar.net -- 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 ///

h_east

unread,
Jan 14, 2017, 9:05:51 AM1/14/17
to vim_dev
Hi Bram,

2017-1-14(Sat) 22:54:57 UTC+9 Bram Moolenaar:

Is the following patch correct?
https://groups.google.com/d/msg/vim_dev/afsWQ48bfn0/xF-mCefjBwAJ

--
Best regards,
Hirohito Higashi (a.k.a. h_east)

Bram Moolenaar

unread,
Jan 14, 2017, 9:21:21 AM1/14/17
to vim...@googlegroups.com, h_east
It works for me.

--
God made the integers; all else is the work of Man.
-- Kronecker

h_east

unread,
Jan 14, 2017, 9:25:50 AM1/14/17
to vim_dev, h.eas...@gmail.com
hi Bram,

> It works for me.

The following setting is no works. (set 'cursorline' without 'cursorcolumn')
:set cursorbind cursorline nocursorcolumn

h_east

unread,
Jan 14, 2017, 9:34:07 AM1/14/17
to vim_dev, h.eas...@gmail.com
Hi Bram,

Here is a patch. (Attached)

fix_scb_and_cul_without_cuc.patch

Bram Moolenaar

unread,
Jan 14, 2017, 9:53:06 AM1/14/17
to vim...@googlegroups.com, h_east

Hirohito Higashi wrote:

> Here is a patch. (Attached)

Thanks, but that does not appear to solve the problem.
Looks like we need to use NOT_VALID for redraw_later().


--
This sentence is not sure that it exists, but if it does, it will
certainly consider the possibility that other sentences exist.

Masanori Misono

unread,
Jan 14, 2017, 6:48:56 PM1/14/17
to vim_dev, h.eas...@gmail.com
Hi Bram,

2017年1月14日土曜日 23時21分21秒 UTC+9 Bram Moolenaar:
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

Bram Moolenaar

unread,
Jan 15, 2017, 7:54:13 AM1/15/17
to vim...@googlegroups.com, Masanori Misono, h.eas...@gmail.com
Checking w_p_crb is not needed, it is already checked in the "if" above.

I solved it by using NOT_VALID for redraw_later(), but now relaize that
is less efficient than calling validate_cursor() when 'cuc' or 'cul' is
set.

--
Ten bugs in the hand is better than one as yet undetected.
Reply all
Reply to author
Forward
0 new messages