diff --git a/src/wreadln.c b/src/wreadln.c
index 89bcc123ce371de17e06b2d9f529755b76ed3ca4..926f223b7fcdc031347cb811370be1a7fdf920cb 100644 (file)
--- a/src/wreadln.c
+++ b/src/wreadln.c
wr->line + wr->cursor, rest);
wr->line[wr->cursor] = key;
- cursor_move_right(wr);
+ wr->cursor += length;
+ if (wr->cursor >= (size_t)wr->width &&
+ wr->start < wr->cursor - wr->width + 1)
+ wr->start += length;
}
static void