diff options
author | Steve Bennett <steveb@workware.net.au> | 2012-10-19 08:02:06 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2012-10-19 08:02:06 +1000 |
commit | 88697045767b05755a0a31a254e2e3af73c6a0c3 (patch) | |
tree | f19f58da317d67cd85173c3ad3c7c8b10fc5a20d /linenoise.c | |
parent | 0cca57a4d835a04638e2a662f16db7ca76165eba (diff) | |
download | jimtcl-88697045767b05755a0a31a254e2e3af73c6a0c3.zip jimtcl-88697045767b05755a0a31a254e2e3af73c6a0c3.tar.gz jimtcl-88697045767b05755a0a31a254e2e3af73c6a0c3.tar.bz2 |
Fix a linenoise bug when moving off the left
If the buffer is too big to fit in the window and the cursor
would move off the left edge of the windows, the display
is not shown correctly.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'linenoise.c')
-rw-r--r-- | linenoise.c | 2 |
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--; |