diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/wreadln.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/wreadln.c b/src/wreadln.c index 89bcc123c..926f223b7 100644 --- a/src/wreadln.c +++ b/src/wreadln.c @@ -130,7 +130,10 @@ wreadln_insert_byte(struct wreadln *wr, gint key) 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 |