r/o

7524f0c598a7fe099586724895e695036ab9b2a6 parent 77859024

authored by Yuki Izumi <yuki@kivikakk.ee> 10 years ago
committed by Yuki Izumi <yuki@kivikakk.ee> 10 years ago

Backspace over normal letters!

qb.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/qb.c b/qb.c
index 5b888b1..66a8b37 100644
--- a/qb.c
+++ b/qb.c
@@ -120,6 +120,11 @@ static void delete_at(doc_line_t *d, int offset, int dir) {
free_doc_line(d);
--total_lines;
+ } else if (dir == -1) {
+ /* offset > 0 */
+ bcopy(d->line + offset, d->line + offset - 1, d->stored - offset);
+ --d->stored;
+ --cursor_x;
}
}