diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2018-11-01 19:33:20 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2018-11-01 19:33:20 -0700 |
commit | ef6e166374265301ee65d58eb35a0d3157220dd0 (patch) | |
tree | 01507eb6eb68fd71841ea25cc1b33113a852f64e | |
parent | 448ed19e9cf060e63eaa2a6501e0a29f8b48f6c6 (diff) | |
download | txr-ef6e166374265301ee65d58eb35a0d3157220dd0.tar.gz txr-ef6e166374265301ee65d58eb35a0d3157220dd0.tar.bz2 txr-ef6e166374265301ee65d58eb35a0d3157220dd0.zip |
linenoise: check for null move in move_cursor.
* linenoise/linenoise.c (move_cursor): Do nothing
if the requested position is current.
-rw-r--r-- | linenoise/linenoise.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/linenoise/linenoise.c b/linenoise/linenoise.c index afc4e187..a7335aae 100644 --- a/linenoise/linenoise.c +++ b/linenoise/linenoise.c @@ -1275,6 +1275,9 @@ static void move_cursor_multiline(lino_t *l, int npos) static void move_cursor(lino_t *l, int npos) { + if (npos == l->dpos) + return; + if (l->mlmode) { move_cursor_multiline(l, npos); } else { |