diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2018-11-01 19:30:20 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2018-11-01 19:30:20 -0700 |
commit | 438bb47da771479443a4468438974a6caebb78a1 (patch) | |
tree | cea4b9886d73c4a89e397a190dcf916c439450ef /linenoise | |
parent | e0538074552ca48f7c994a49dce12be9210f07d4 (diff) | |
download | txr-438bb47da771479443a4468438974a6caebb78a1.tar.gz txr-438bb47da771479443a4468438974a6caebb78a1.tar.bz2 txr-438bb47da771479443a4468438974a6caebb78a1.zip |
linenoise: small move_cursor bugfix.
* linenoise/linenoise.c (move_cursor): We must update the
oldrow variable, expected by refresh_line to be tracking the
row position of the cursor. This bug doesn't affect the
current use of move_cursor for paren_jump, because that logic
moves the cursor to the original position, which makes the
oldrow value correct, and refresh_line is never called in
between. If we want to use move_cursor in more situations,
this has to be fixed.
Diffstat (limited to 'linenoise')
-rw-r--r-- | linenoise/linenoise.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/linenoise/linenoise.c b/linenoise/linenoise.c index 081533a8..afc4e187 100644 --- a/linenoise/linenoise.c +++ b/linenoise/linenoise.c @@ -1270,6 +1270,7 @@ static void move_cursor_multiline(lino_t *l, int npos) (void) lino_os.puts_fn(l->tty_ofs, ab.b); ab_free(&ab); l->dpos = npos; + l->oldrow = nrow; } static void move_cursor(lino_t *l, int npos) |