I already mentioned that the current code only has the first step, there
is lots more to do to get it right. This is complicated, many parts of
the code depend on the relation between buffer text and the actually
displayed text.
Nevertheless, the idea of using text properties, defining the position,
how it shifts with the text, highlighting, and how the text is defined,
already give you an idea of how the virtual text can be added. Main
thing missing is how to position text after the end of the line. We
probably also want right-aligned somehow (and figure out what to do when
it doesn't fit, might need some alternatives).
And it shows how it differs from concealing, which depends on syntax
highlighting, which can't always be figured out within the line itself,
making it too slow to use in general (which is why wrapping is based on
the text without concealing).
--
hundred-and-one symptoms of being an internet addict:
162. You go outside and look for a brightness knob to turn down the sun.
/// Bram Moolenaar -- Br...@Moolenaar.net --
http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features --
http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims --
http://ICCF-Holland.org ///