With the old solution I replaced tabs with four spaces and then did
some calculations to get the correct byte positions for a coordinate.
With the new solution (using FontMetric.horizontalAdvance) this is not
necessary anymore and we can use tha native tab.
But I cannot change the tab width. It is always 8 characters.
You can set tabStopDistance on horizontalAdvance(), but not on
elided_text() and I did not find a way to use it while rendering text.
watchdog does not work on windows. For some
reason file modification events are not
emitted.
Fixed by replacing watchdog with a thread
that polls the modification date ever 0.5s.
Also fixed a bug that the hit view was not
properly destructed.
This works on Windows, but it might not work on Linux.
Also the version number is not updated automatically.
I probably have to generate the file from a template, because
even though this is a python file you cannot add python code.
Graphemes don't all have the same width, not even when you use a monospace font.
For latin characters it usually works find to assume the same width. But emojis,
japanese or chinese characters have have different width. There are even some
ultra wide characters like 𒐫 or ﷽. There is also a thing
called 'half-width' character. E.g. the japanese 'a' can be ア or ア.
Fixed by actually computing the width of graphemes and using pixel.
step 4 - add repeat actions
This has probably a problem. The repeat action is triggering updates asynchronously.
Which means we do not wait until it is done. Which means we can DOS ourselves.
In stage 1 we use a glob pattern matching the file name.
Stage 2 (which I will maybe implement some day) might use some additional magic byte sequence for file type detection.