bim: upstream bug fix

This commit is contained in:
K. Lange 2021-10-29 07:50:01 +09:00
parent 359dee113b
commit 7510134916

View File

@ -1442,16 +1442,16 @@ line_t ** split_line(line_t ** lines, int line, int split) {
HIST_APPEND(e); HIST_APPEND(e);
} }
if (!env->loading) {
unhighlight_matching_paren();
}
/* Allocate more space as needed */ /* Allocate more space as needed */
if (env->line_count == env->line_avail) { if (env->line_count == env->line_avail) {
env->line_avail *= 2; env->line_avail *= 2;
lines = realloc(lines, sizeof(line_t *) * env->line_avail); lines = realloc(lines, sizeof(line_t *) * env->line_avail);
} }
if (!env->loading) {
unhighlight_matching_paren();
}
/* Shift later lines down */ /* Shift later lines down */
if (line < env->line_count) { if (line < env->line_count) {
memmove(&lines[line+2], &lines[line+1], sizeof(line_t *) * (env->line_count - line)); memmove(&lines[line+2], &lines[line+1], sizeof(line_t *) * (env->line_count - line));