Asking for recommendations on how to add a feature to KTextEditor
mail at svenbrauch.de
Mon Apr 9 16:36:52 UTC 2018
On 04/09/18 15:04, Kevin Funk wrote:
> That indeed would be super helpful to have, for a variety of use-cases.
> +1 on the idea for the feature!
I agree here.
However I think in detail this feature is much more complicated than
you'd think it would be, starting from how you think it *should* behave.
For example, how exactly does the cursor behave around these items? If
you move up/down, it currently keeps its horizontal position, which for
fixed fonts means you keep the column. How do the items affect this? ...
and lots of other issues like this.
You will also need to touch the text layout code, which is not exactly
the most ... innocent place to add new features. But by all means, this
is not meant to dissuade you, please give it a try! What you suggest
sounds sensible; add a vector to store these items, some API to
manipulate them, teach the renderer to paint them and consider them in
the layout, and teach functions like xToCursor about it, then see what
Probably Dominik and Christoph have some more explicit ideas about what
exactly is going to break if you try this. ;)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 833 bytes
Desc: OpenPGP digital signature
More information about the KWrite-Devel