summaryrefslogtreecommitdiffstats
path: root/match.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2022-01-28 19:30:50 -0800
committerKaz Kylheku <kaz@kylheku.com>2022-01-28 19:30:50 -0800
commitdc611e17c14040fa0530ed28c33919c1aa4a270e (patch)
tree7c232a185742b2e052471abd4f27f2fc0cf255be /match.c
parentcc413849fc0b92fee3c33ffd16378ca6ffa1070d (diff)
downloadtxr-dc611e17c14040fa0530ed28c33919c1aa4a270e.tar.gz
txr-dc611e17c14040fa0530ed28c33919c1aa4a270e.tar.bz2
txr-dc611e17c14040fa0530ed28c33919c1aa4a270e.zip
repl: bug handling comments in plain mode.
The is_balanced_line function assumes that comments are terminated by a carriage return, whic his the multi-line convention used by the interactive repl. The plain-mode listener, though, only replaces newlines by carriage returns when returning the complete multi-line input. When invoking the is_balanced_line callback, the newlines are still there, and so comments are not handled properly. Reported by Paul. A. Patience. * linenoise/linenoise.c (linenoise): In plain mode, replace the trailing newline with a carriage return after every physical line input, before that line is passed to the lino->enter_callback (i.e. is_balanced_line). The code to replace newlines with carriage returns at the end is consequently no longer required.
Diffstat (limited to 'match.c')
0 files changed, 0 insertions, 0 deletions