Hi
Concealed items in current line are displayed unconcealed
in the current line (to be able to edit the current line) except
when 'modifiable' is off, in which case, the current line is displayed
concealed like any other line.
When changing the 'modifiable' option (with :set modifiable!),
vim-7.3a (2255:0e27866cea99) does not redraw the current line
concealed or unconcealed (user needs to press CTRL-L to redraw
it correctly).
Attached patch fixes it. I also added a note in the help file
to document the effect of the 'modifiable' option regarding
concealed items (I could not see anything about it in the doc)
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 runtime/doc/syntax.txt
--- a/runtime/doc/syntax.txt Tue Jun 08 23:17:01 2010 +0200
+++ b/runtime/doc/syntax.txt Wed Jun 09 19:30:42 2010 +0200
@@ -3136,7 +3136,9 @@
When the "conceal" argument is given, the item is marked as concealable.
Whether or not it is actually concealed depends on the setting on the
-'conceallevel' option.
+'conceallevel' option. If 'modifiable' option is on, concealable items
+in the current line are always displayed unconcealed to be able to edit
+the line.
concealends *:syn-concealends*
diff -r 0e27866cea99 src/option.c
--- a/src/option.c Tue Jun 08 23:17:01 2010 +0200
+++ b/src/option.c Wed Jun 09 19:30:42 2010 +0200
@@ -7329,12 +7329,21 @@
#endif
}
-#ifdef FEAT_TITLE
- /* when 'modifiable' is changed, redraw the window title */
+#if defined(FEAT_TITLE) || defined(FEAT_CONCEAL)
+ /* when 'modifiable' is changed, redraw the window title and
+ * update current line for concealable items */
else if ((int *)varp == &curbuf->b_p_ma)
{
+# ifdef FEAT_TITLE
redraw_titles();
- }
+# endif
+# ifdef FEAT_CONCEAL
+ if (curwin->w_p_conceal)
+ update_single_line(curwin, curwin->w_cursor.lnum);
+# endif
+ }
+#endif
+#ifdef FEAT_TITLE
/* when 'endofline' is changed, redraw the window title */
else if ((int *)varp == &curbuf->b_p_eol)
{
@@ -8434,7 +8443,7 @@
get_option_value(name, numval, stringval, opt_flags)
char_u *name;
long *numval;
- char_u **stringval; /* NULL when only checking existance */
+ char_u **stringval; /* NULL when only checking existence */
int opt_flags;
{
int opt_idx;