Bug in cursor_select_by_bracket
adsr opened this issue · 0 comments
adsr commented
I found a bug in cursor_select_by_bracket
that surfaces when the matching bracket is greater than MLE_BRACKET_PAIR_MAX_SEARCH
chars away from the cursor. The following shell script reproduces:
# Open editor with >MLE_BRACKET_PAIR_MAX_SEARCH chars of content:
# (
# 1
# 2
# ...
# 10000
# )
# Then, invoking `cmd_anchor_by bracket` (`C-2 d`) inside the parenthesis causes a segfault
{ echo '('; seq 1 10000; echo ')'; } | ./mle -N -H0 -M 'a right C-2 d C-x n' -pa
Bugfix to follow.