diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-25 09:20:56 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-25 09:20:56 +0300 |
| commit | 9b54bde17133117669b748310cbbaf036c897904 (patch) | |
| tree | 9366f26f778edea8ec17ca90a7e5f1ec6af583a2 /docs/basic-arithmetic.md | |
| parent | 16e3ca1b90639c52ecff507de4fbb90e2d0e0f85 (diff) | |
fix: return readline suffixes instead of full matches
Per the readline AutoCompleter docs, Do() should return suffixes
(the characters AFTER the common prefix), not full matches. The
length parameter indicates how many characters are shared.
This fixes the bug where readline appended the full match to the
typed input (e.g. 'he' + 'help' = 'hehelp') because commonLen
was 0 and readline had no idea what to replace.
Now 'he<TAB>' returns suffix 'lp' with commonLen=2, so readline
correctly replaces 'he' with 'help'.
Diffstat (limited to 'docs/basic-arithmetic.md')
0 files changed, 0 insertions, 0 deletions
