[BRLTTY] Prompt matching, again

Aura Kelloniemi kaura.dev at sange.fi
Thu Sep 10 09:41:37 EDT 2020


Hello list,

There are problems in the current prompt matching implementation. I'm now
talking about the regex matching, not the original approach.

I noticed the problems when I tried to define patterns which contain spaces,
and when I took a look at the code, I found the following loop from
cmd_navigation.c, line 495.

        while (length < scr.cols) {
            if (characters[length].text == WC_C(' ')) break;
            length += 1;
        }

This code essentially defeats all my attempts to match against a prompt which
contains spaces. This code should be disabled, when the regex matching feature
is in use.

Also, it seems that BRLTTY still falls back to the original prompt matching
strategy when I use the PRPROMPT command (but not when I use NXPROMPT). When
at least one prompt pattern is defined, PRPROMPT moves the braille window to
the previous line which either matches a prompt pattern or matches the first
word on the cursor line. For me this is highly undesirable. This prevented me
from noticing for a long time that my patterns don't actually work correctly.

-- 
Aura


More information about the BRLTTY mailing list