> Problem Description.
>
> Suppose you have a line in a window that is longer than the window
> width and that the 'wrap' option is on. That line will wrap onto the
> next screen line. Now suppose we choose to conceal a string of two or
> more characters that appear on the first line. What I see, once the
> conceal is enabled, is the text on the first line is shortened, as one
> might expect, but the excess characters on the 2'nd line remain there.
> I expected them to fill-up the newly available space on the first line
> but they do not. Is this expected behavior or a bug?
>
> This behavior can be demonstrated with the following ex-commands:
>
> " create a line longer than the current window
> let text = "HIDEME" . repeat("x",winwidth(0))
> call setline(1, text)
> set wrap nonumber
> " there will be 6 characters on the 2'nd line
> " setup for conceal:
> set conceallevel=1
> set concealcursor=nv
> syntax on
> " make it so:
> syntax match hideMe "HIDEME" conceal cchar=h
> " line 1 is shorter by 5 chars but there are still 6 characters on line 2
> " now if you set nowrap, the 2'nd line will move onto the 1'st
> set nowrap
>
> I came across this because I was investigating the failure of one of
> your validation tests- I was running it in a window much smaller than
> 80x24. Normally that test would not be allowed to run but that policy
> is a discussion for another day and thread.
It's not ideal, but this is the expected behavior. If the wrapping
would depend on what is concealed, computing the position of a character
becomes quite expensive. So currently wrapping is done before
concealing. Not sure how much work it is and what the performance
penalty would be to make this work differently.
--
Back off man, I'm a scientist.
-- Peter, Ghostbusters
/// 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
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.