Commit 09ddc70963adf2bc40a0f5ddeb84bec968493915

antirez 2013-02-07T17:30:49

Fix to multi-line mode when deleting cross-line with cursor at EOL.

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/linenoise.c b/linenoise.c
index 5293abf..b3c0b96 100644
--- a/linenoise.c
+++ b/linenoise.c
@@ -406,7 +406,6 @@ static void refreshMultiLine(struct linenoiseState *l) {
     /* If we are at the very end of the screen with our prompt, we need to
      * emit a newline and move the prompt to the first column. */
     if (l->pos &&
-        l->pos > l->oldpos &&
         l->pos == l->len &&
         (l->pos+plen) % l->cols == 0)
     {