[removed vim-use]

Christian Brabandt wrote:

> On So, 19 Jun 2011, Bram Moolenaar wrote:
> 
> > Christian Brabandt wrote:
> > > On Di, 14 Jun 2011, hsitz wrote:
> > > > On Jun 14, 7:35 pm, Bram Moolenaar <[email protected]> wrote:
> > > > > That's a bug.
> > > > Thanks for confirming.  I will move to vim-dev.  Here are some steps
> > > > to reproduce it.
> > > > 
> > > > 1.  Create a document with this line of text:
> > > > This is text.  [abcd] The text in brackets is concealed.
> > > > 
> > > > 2.  :syn match MyHiddenText conceal '\[.\{-1,}]'
> > > > 
> > > > 3.  :set conceallevel=3
> > > > 
> > > > 4.  :set concealcursor=nc
> > > > 
> > > > The brackets and text inside should now be invisible.  Click with the
> > > > mouse on the 'b' in 'brackets' and the cursor appears on the line 6
> > > > chars to the left of where you click.  The problem happens with both
> > > > 'conceal' areas and 'concealends' areas.
> > > 
> > > Attached patch fixes it.
> > 
> > I had a look at the patch now.  It will only fix it for a very limited
> > number of situations.  Not for the help files, which have 'cole' set to
> > 2.  I also suspect it's wrong for when there are double-width
> > characters.
> 
> Bram, what would be the best way, to count the number of concealed chars 
> at a given position within a line? My basic attempt in this patch, 
> didn't take double_width chars into account?
> 
> This concealing stuff is really hard to get right ;)

I'm not sure what the best solution is.  It probably requires making
changes where the size of a tab character is taken into account, since
the relation between the character and the space on the screen is not
1:1.  However, since the syntax matters, doing this for conceal mode
can make it really slow.

Also try out the | command to move to a specific column.  Is that also
wrong when there are concealed characters?

-- 
The greatest lies of all time:
  (1) The check is in the mail.
  (2) We have a really challenging assignment for you.
  (3) I love you.
  (4) All bugs have been fixed.
  (5) This won't hurt a bit.
  (6) Honey, I just need to debug this program and be home in 5 minutes.
  (7) I have just sent you an e-mail about that.
  (8) Of course I'll respect you in the morning.
  (9) I'm from the government, and I'm here to help you.

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

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

Raspunde prin e-mail lui