diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-09-25 06:46:07 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-09-25 06:46:07 -0700 |
commit | 9f777d5898216453055a570c06d561e540241261 (patch) | |
tree | c71601232614725f33de99744ec5e16d67596e1d /args.c | |
parent | 977d61d2229d3517226edfb3a32b929c6d95d19b (diff) | |
download | txr-9f777d5898216453055a570c06d561e540241261.tar.gz txr-9f777d5898216453055a570c06d561e540241261.tar.bz2 txr-9f777d5898216453055a570c06d561e540241261.zip |
linenoise: fix multi-line issues with long lines
* linenoise/linenoise.c (screen_rows): Restructured.
Calculates correct cursor rows (out.rows[1]). It's now
possible that the reported cursor row exceeds the number of
rows (out.rows[0]), because the cursor is on the last line,
which itself doesn't wrap, but the cursor does.
(refresh_multiline): Cursor wrapping calculation is
simple now: just check that nrow > rows.
Coalesced code for dealing with cursor position.
Diffstat (limited to 'args.c')
0 files changed, 0 insertions, 0 deletions