Alexey Radkov wrote: > Finally I made a patch that fixes multiple wrapping breaks too. It should > not affect badly all the features elaborated in win_line() so far, > including Tab adjustments / boguscols. See attached movie. > > Cheers, Alexey. > > 2015-07-07 14:49 GMT+03:00 Alexey Radkov <[email protected]>: > > > Looks like I managed to fix this (not completely, see below). > > > > The idea is that part of win_line() starting from line > > > > else if (wp->w_p_cole > 0 && is_concealing) > > > > and including that "voodoo" code for wrapped lines increments value of > > vcol_off. Doing that for vcol_off but not fot vcol is ok for lines conten= > t, > > but is not ok for cuc and colorcolumn: they must keep same positions if > > they are at the wrapped part of line, i.e. increment of vcol_off must be > > compensated by same increment of vcol. This is what the new patch does. I= > t > > adds a new flag is_wrapping which is set when is_concealing and > > wp->w_p_wrap and a new variable vcol_adj_wrap for compensation of vcol wh= > en > > wrapped part of a line is going to be printed. This compensation is added > > in the macro VCOL_HLC. > > > > This works perfectly when there is one line break: all positions of > > colorcolumn and cuc are correct when cursor is being moved around. But wh= > en > > I tested this for lines with multiple wrapping breaks I found that the > > positions *may* still fail: I do not know why at the moment - the code of > > win_line() is very huge to quickly find the reason. > > > > Cheers, Alexey. > > > > P.S. Not regarding to the issue. Looks like content of showbreaks are > > counted as columns too: this make both printing column number at status > > line and positioning of colorcolumn wrong (in my opinion), though it was > > probably done by design (strange nevertheless). > > > > > > 2015-07-05 19:49 GMT+03:00 Bram Moolenaar <[email protected]>: > > > >> > >> Alexey Radkov wrote: > >> > >> > Here is a little patch that fixes broken visualization of cursorcolumn > >> and > >> > colorcolumn when there are many wrapped concealed lines. The idea is t= > o > >> > enable special voodoo code in win_line() at l. 5437 only for current > >> row. > >> > Conceal offsets on other lines may differ so this voodoo magic being > >> > applied to them shifts positions of cursorcolumn and colorcolumn > >> relative > >> > to the current line where the cursor is positioned. This may look ugly= > . > >> > > >> > I attached two images that show broken columns before the patch applie= > d > >> and > >> > good looking columns after the patch. The focus is at the right window > >> on a > >> > dot sign after wrapped Russian word "=D1=82=D0=B5=D0=BF=D0=BB=D0=B5=D0= > =B5". > >> > >> So, it makes it a bit better in this situation. I wonder what happens in > >> other situations...
Christian, since you worked in this area for the linebreak stuff, can you check if this patch improves things? -- hundred-and-one symptoms of being an internet addict: 186. You overstay in the office so you can have more time surfing the net. /// 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.
