Complexity of a Text Input Widget

Both of the v1.6 patches so far have addressed regressions in Lagrange's text input widget. This is because I did a major rewrite of its internals to better support multiline long-form content. Since the widget is quite complex, several details and edge cases broke in its behavior.

This got me thinking, exactly how complex is the `InputWidget` class? It has the following functionality in addition to the normal behavior of any `Widget`:

😬

With a feature list like this, one can understand why text editors are apps in their own right. (The class stands at 2000 lines of code at the moment.)

Even if I was using a ready-made text editor from some GUI framework, there's plenty of custom functionality here that would complicate things. Some of these could be quite difficult to do depending on the framework.

I'll be making more tweaks and fixes for v1.6.3. Fortunately, severity of the remaining bugs is trending down.

📅 2021-08-04

🏷 Lagrange

CC-BY-SA 4.0

The original Gemtext version of this page can be accessed with a Gemini client: gemini://skyjake.fi/gemlog/2021-08_complexity-of-input.gmi