Posted on Mar 16, 2010 by
Happy Giraffe
in src/lib/vterm.cpp
if (mode_flags.insert_mode) {
changed_line(cursor_y, cursor_x, width - 1);
u16 step = dw ? 2 : 1;
if 0
for (u16 i = cursor_x; i < width - step; i++) {
text[yp + i + step] = text[yp + i];
attrs[yp + i + step] = attrs[yp + i];
}
else
/* BUG FIXED */
for (s32 i = width - step; i >= cursor_x; i--) {
text[yp + i + step] = text[yp + i];
attrs[yp + i + step] = attrs[yp + i];
}
endif
} else {
changed_line(cursor_y, cursor_x, cursor_x + (dw ? 1 : 0));
}
Comment #1
Posted on Mar 20, 2010 by Happy HorseThanks for your patch, but the loop start index should be (width - step -1)
Comment #2
Posted on Oct 6, 2010 by Happy Horse(No comment was entered for this change.)
Status: Verified
Labels:
Type-Defect
Priority-Medium