I'm running the latest version of Vim 7.3 on Windows XP, compiled
myself with MinGW from changeset acfb7eddf13c (Update TeX syntax
file).
Using the attached test.vim script, I start Vim with:
gvim -N -u NONE -i NONE test.vim -c "source %"
I see mostly what I would expect, but the line that matches the
"concealends" syntax rule is missing the listchars replacement for the
first concealed end. See conceal_bug_start.png.
Now, I press 'j' several times to move past all the comment lines, and
see the two wholly concealed lines disappear entirely from view,
without even the cchar replacement character. See conceal_bug_end.png.
Now, I can use :redraw! (with the '!') to restore Vim back to the
state I started with. Moving the cursor over the concealed lines
repeats the process.
Version output:
VIM - Vi IMproved 7.3c BETA (2010 Jul 25, compiled Jul 26 2010 23:06:56)
MS-Windows 32-bit GUI version
Compiled by Ben
Huge version with GUI. Features included (+) or not (-):
+arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent
+clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments
+conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con_gui +diff
+digraphs -dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi
+file_in_path +find_in_path +float +folding -footer +gettext/dyn -hangul_input
+iconv/dyn +insert_expand +jumplist +keymap +langmap +libcall +linebreak
+lispindent +listcmds +localmap -lua +menu +mksession +modify_fname +mouse
+mouseshape +multi_byte_ime/dyn +multi_lang -mzscheme +netbeans_intg -ole
-osfiletype +path_extra -perl +persistent_undo -postscript +printer +profile
-python -python3 +quickfix +reltime +rightleft -ruby +scrollbind +signs
+smartindent -sniff +startuptime +statusline -sun_workshop +syntax +tag_binary
+tag_old_static -tag_any_white -tcl -tgetent -termresponse +textobjects +title
+toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo
+vreplace +wildignore +wildmenu +windows +writebackup -xfontset -xim
-xterm_save -xpm_w32
system vimrc file: "$VIM\vimrc"
user vimrc file: "$HOME\_vimrc"
2nd user vimrc file: "$VIM\_vimrc"
user exrc file: "$HOME\_exrc"
2nd user exrc file: "$VIM\_exrc"
system gvimrc file: "$VIM\gvimrc"
user gvimrc file: "$HOME\_gvimrc"
2nd user gvimrc file: "$VIM\_gvimrc"
system menu file: "$VIMRUNTIME\menu.vim"
Compilation: gcc -Iproto -DWIN32 -DWINVER=0x0400 -D_WIN32_WINNT=0x0400
-DHAVE_PATHDEF -DFEAT_HUGE -DHAVE_GETTEXT -DHAVE_LOCALE_H
-DDYNAMIC_GETTEXT -DFEAT_CSCOPE -DFEAT_NETBEANS_INTG -DFEAT_GUI_W32
-DFEAT_CLIPBOARD -DFEAT_MBYTE -DFEAT_MBYTE_IME -DDYNAMIC_IME
-DDYNAMIC_ICONV -pipe -w -march=i386 -Wall -O3 -fomit-frame-pointer
-freg-struct-return -s
Linking: gcc -Iproto -DWIN32 -DWINVER=0x0400 -D_WIN32_WINNT=0x0400
-DHAVE_PATHDEF -DFEAT_HUGE -DHAVE_GETTEXT -DHAVE_LOCALE_H
-DDYNAMIC_GETTEXT -DFEAT_CSCOPE -DFEAT_NETBEANS_INTG -DFEAT_GUI_W32
-DFEAT_CLIPBOARD -DFEAT_MBYTE -DFEAT_MBYTE_IME -DDYNAMIC_IME
-DDYNAMIC_ICONV -pipe -w -march=i386 -Wall -O3 -fomit-frame-pointer
-freg-struct-return -s -mwindows -o gvim.exe -lkernel32 -luser32
-lgdi32 -ladvapi32 -lcomdlg32 -lcomctl32 -lversion -lwsock32 -lole32
-luuid
> I see mostly what I would expect, but the line that matches the
> "concealends" syntax rule is missing the listchars replacement for the
> first concealed end. See conceal_bug_start.png.
> Now, I press 'j' several times to move past all the comment lines, and
> see the two wholly concealed lines disappear entirely from view,
> without even the cchar replacement character. See conceal_bug_end.png.
Both of these are regressions - I just checked test.vim with my Vim 7.2 (including my
original conceal patch) and neither bug occurs.
The bug also doesn't occur in the 7.3 beta of 15th May.
> I see mostly what I would expect, but the line that matches the
> "concealends" syntax rule is missing the listchars replacement for the
> first concealed end. See conceal_bug_start.png.
> Now, I press 'j' several times to move past all the comment lines, and
> see the two wholly concealed lines disappear entirely from view,
> without even the cchar replacement character. See conceal_bug_end.png.
This bug crept in with changeset 2391 - "Give each syntax item a sequence number, so that we know when it starts and.."
rev 2390 is fine, 2391 is broken.
Maybe there is a place where "syntax_seqnr" needs to be incremented but isn't?
Vince
> This bug crept in with changeset 2391 -
> Maybe there is a place where "syntax_seqnr" needs to be incremented but isn't?
This patch (against 2391) appears to fix the broken concealends. Not the blank
lines in a region though.
diff -r 0371401d9d33 src/syntax.c
--- a/src/syntax.c Sat Jul 24 17:29:03 2010 +0200
+++ b/src/syntax.c Tue Jul 27 14:50:39 2010 +0100
@@ -2492,7 +2492,10 @@
#ifdef FEAT_CONCEAL
cur_si->si_flags |= save_flags;
if (cur_si->si_flags & HL_CONCEALENDS)
+ {
cur_si->si_flags |= HL_CONCEAL;
+ cur_si->si_seqnr = next_seqnr++;
+ }
#endif
cur_si->si_next_list = NULL;
check_keepend();
> This bug crept in with changeset 2391 - "Give each syntax item
> a sequence number, so that we know when it starts and.." rev
> 2390 is fine, 2391 is broken.
you cannot use that first number to communicate -- the "Give
each item a sequence number" changeset for me was 2432 -- that
number is different for everybody -- you must use the horking
and unambiguous 0371401d9d33
sorry to go off topic
sc
> you cannot use that first number to communicate -- the "Give
> each item a sequence number" changeset for me was 2432 -- that
> number is different for everybody -- you must use the horking
> and unambiguous 0371401d9d33
> sorry to go off topic
No need to apologise - thanks for the correction (I am something of a Mercurial n00b.)
Back on topic - in order to fix the missing cchars in wholly concealed lines in a region,
we need to somehow increment the seqnr with each new line begun in the region. Any ideas
how to do this? It wasn't obvious as it was in the case of "concealends".
Would it be possible on the other end: decrement the expected sequence
number when going to the next line?
--
God made machine language; all the rest is the work of man.
/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Glad to hear from you again Vince. I've been making changes to the
conceal feature and had not received remarks from you yet. Especially
about the 'concealcursor' option. And also this issue with consecutive
matches of concealed items.
I found another place where HL_CONCEAL was set and the si_seqnr wasn't.
I'll push that right away.
--
The chat program is in public domain. This is not the GNU public license.
If it breaks then you get to keep both pieces.
-- Copyright notice for the chat program
> I brought these up initially in another thread but I'm posting a new
> one so it doesn't get lost in the shuffle. And I said I'd try to
> reproduce it from the latest update and without my .vimrc.
>
> I'm running the latest version of Vim 7.3 on Windows XP, compiled
> myself with MinGW from changeset acfb7eddf13c (Update TeX syntax
> file).
>
> Using the attached test.vim script, I start Vim with:
>
> gvim -N -u NONE -i NONE test.vim -c "source %"
>
> I see mostly what I would expect, but the line that matches the
> "concealends" syntax rule is missing the listchars replacement for the
> first concealed end. See conceal_bug_start.png.
>
> Now, I press 'j' several times to move past all the comment lines, and
> see the two wholly concealed lines disappear entirely from view,
> without even the cchar replacement character. See conceal_bug_end.png.
>
> Now, I can use :redraw! (with the '!') to restore Vim back to the
> state I started with. Moving the cursor over the concealed lines
> repeats the process.
I have fixed this now. Please check for any remaining problems.
--
If you don't get everything you want, think of
everything you didn't get and don't want.
> I've noticed that there is no mention in the help files that one can use things
> like:
>
> 1. :h i^x^k or even
> :h^x^k instead of
> :h i_CTRL-X_CTRL-K
I'll add something about that in helphelp.txt.
> 2. [count] gqq will format count lines
The count is not explicitly mentioned, this applies to more commands,
probably.
--
"The future's already arrived - it's just not evenly distributed yet."
-- William Gibson
I didn't know about i^x, but I knew about :help :| and :help "x (and
similar) which will replace | by bar or " by quote. I don't know if it's
documented anywhere either.
i^x^k doesn't work, at least not if compiled with +digraphs (the Ctrl-K
waits for a digraph or special key).
Best regards,
Tony.
--
Men may not be seen publicly in any kind of strapless gown.
[real standing law in Florida, United States of America]