aboutsummaryrefslogtreecommitdiff
path: root/linenoise.c
diff options
context:
space:
mode:
Diffstat (limited to 'linenoise.c')
-rw-r--r--linenoise.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/linenoise.c b/linenoise.c
index 418bede..e6f8ede 100644
--- a/linenoise.c
+++ b/linenoise.c
@@ -694,7 +694,7 @@ static void refreshLine(const char *prompt, struct current *current)
n++;
}
- while (n >= current->cols) {
+ while (n >= current->cols && pos > 0) {
b = utf8_tounicode(buf, &ch);
if (ch < ' ') {
n--;