linenoiseHistorySetMaxLen() was broken and never tested. Fixed.
Example app improved.