Hi

I notice a bug with conceal feature: the content of
the fold column is not displayed correctly when using
'conceallevel' with a value >= 1.

Steps to reproduce:

1) Enter this command:

$ yes foo | head -10 | \
  vim --noplugin -u NONE \
      -c 'set foldcolumn=4 conceallevel=1' \
      -c ':3,6fold' \
      -c 'norm zR' -

2) press  j  in normal mode a couple of times to
move cursor down and observe that when cursor
goes inside the open fold, information in the
fold column becomes blank. Pressing CTRL-L to
redraw works around the bug.

Now if you do the same with the slightly different
command...

$ yes foo | head -10 | \
  vim --noplugin -u NONE \
     -c 'set foldcolumn=4 conceallevel=1' \
     -c ':3,$fold' \
     -c 'norm zR' -

You'll notice that when pressing  j  the foldcolumn is
not deleted but it gets filled with '|' even where there
is no fold.

Bug does not happen when setting 'relativenumber' or
'cursorline'.

Attached patch fixes it.  However, I think it may not
be the optimal solution (more redraws than strictly
necessary?).

The same patch also happen to fix several other redraw
issues with conceal items not properly updated when
using the following motion commands in normal mode...

 )
 ]]
 <PageUp>
 <PageDown>
 CTRL-F
 CTRL-B
 CTRL-U
 CTRL-E  (when cursor is on the top line, causing scrolling)
 CTRL-Y  (when cursor is on the bottom line, causing scrolling)
 CTRL-O
 CTRL-I
 [count]go
 [count]g;

and it also fixes conceal item redraw issues with following Ex command:

 :[range]
 :go [count]

Cheers
-- Dominique

-- 
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
diff -r 0e27866cea99 src/move.c
--- a/src/move.c	Tue Jun 08 23:17:01 2010 +0200
+++ b/src/move.c	Thu Jun 10 19:24:43 2010 +0200
@@ -1225,6 +1225,9 @@
 	/* or when w_row changes and 'cursorline' is set. */
 						|| curwin->w_p_cul
 #endif
+#ifdef FEAT_CONCEAL
+						|| curwin->w_p_conceal
+#endif
 	))
 #ifdef FEAT_SYN_HL
 	/* or when w_virtcol changes and 'cursorcolumn' is set */

Raspunde prin e-mail lui