mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
The missing line:
cells += added_chars - 1; This is a fix for bug 778. goto next instead of continue. Not heavilly tested
This commit is contained in:
parent
cf8de8456c
commit
7af9cf5ebc
@ -349,12 +349,10 @@ add_document_line(struct plain_renderer *renderer,
|
|||||||
*template = saved_renderer_template;
|
*template = saved_renderer_template;
|
||||||
|
|
||||||
} else if (line_char == ASCII_BS) {
|
} else if (line_char == ASCII_BS) {
|
||||||
#if 0
|
|
||||||
if (!(expanded + cells)) {
|
if (!(expanded + cells)) {
|
||||||
/* We've backspaced to the start of the line */
|
/* We've backspaced to the start of the line */
|
||||||
continue;
|
goto next;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
if (pos > startpos)
|
if (pos > startpos)
|
||||||
pos--; /* Backspace */
|
pos--; /* Backspace */
|
||||||
|
|
||||||
@ -368,8 +366,10 @@ add_document_line(struct plain_renderer *renderer,
|
|||||||
line[line_pos + charlen] = prev_char;
|
line[line_pos + charlen] = prev_char;
|
||||||
|
|
||||||
/* Go back and reparse the swapped characters */
|
/* Go back and reparse the swapped characters */
|
||||||
if (line_pos - 2 >= 0)
|
if (line_pos - 2 >= 0) {
|
||||||
line_pos -= 2;
|
cells--;
|
||||||
|
line_pos--;
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -430,6 +430,7 @@ add_document_line(struct plain_renderer *renderer,
|
|||||||
|
|
||||||
if (added_chars) {
|
if (added_chars) {
|
||||||
line_pos += added_chars - 1;
|
line_pos += added_chars - 1;
|
||||||
|
cells += added_chars - 1;
|
||||||
pos += added_chars;
|
pos += added_chars;
|
||||||
} else {
|
} else {
|
||||||
#ifdef CONFIG_UTF_8
|
#ifdef CONFIG_UTF_8
|
||||||
@ -469,7 +470,7 @@ add_document_line(struct plain_renderer *renderer,
|
|||||||
|
|
||||||
*template = saved_renderer_template;
|
*template = saved_renderer_template;
|
||||||
}
|
}
|
||||||
|
next:
|
||||||
line_pos += charlen;
|
line_pos += charlen;
|
||||||
cells += cell;
|
cells += cell;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user