tommcdo/vim-exchange

Highlighting is incorrect for the wrapped lines if linebreak is set

sudo-nice opened this issue · 2 comments

Given an example with a long line:

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim

When I have set linebreak and do /inci<cr>cxiw, I see this (exchanging itself acts correctly, though):

scr
I'm on neovim 0.1.6

Hmm, this is a tricky one. I use virtual columns (effectively, the perceived column, not the actual column) to define the highlighting because it's a lot easier for Visual-block selections when there may be a mix of tabs and spaces. Seems that virtual columns are also used for the break-decorating options.

I may be able to rework the logic to compute the actual column when defining the highlighting. Not sure if it will help; 'linebreak' makes things really weird.

I see, thank you for the explanation.