OXY2DEV/markview.nvim

๐Ÿž Bug: Preview does not respect `breakindent` option

NikodemMarek opened this issue ยท 1 comments

Before reporting:

  • Ensure that the issue is reproducable on the main branch.
  • Ensure that there isn't an issue on this(either open or closed).

Problem:

When previewing certain elements, the breakindent option is not respected

image

Like in this example, where "breakindent" word should be on the same level as the dot

Steps to reproduce the issue:

create line with long content, that should be wrapped, and additionally is indented by markview

Expected behavior:

text after wrap should be on the same indent level as the rest of the line

Neovim version:

0.10.2

That's just how wrap works.

Wrap doesn't take account of concealments and therefore makes it almost impossible to accurately measure where the text will be wrapped.


Unless Neovim changes this behavior this cannot be fixed.

Furthermore, lines that have multiple breaks may be inaccurate and may need to be calculated on each break.

This is not fast in anyway and is hard to implement.

Also, texts such as emojis can take varying amount of spaces which may result in inaccurate results.

And to make matters worse, stuff like inline code, links etc. will get cutoffs in certain circumstances making things worse to look at.