aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2021-10-21 09:13:07 +0200
committerPřemysl Eric Janouch <p@janouch.name>2021-10-21 09:13:07 +0200
commit53fbb3dec127cee677563c07a9ca09280af500d4 (patch)
treeb734aae1f362bb72bc10d78efa263d2636019ce4
parent267598643a17f5f7a2ba1aaf0feba4d1dfbcbcbd (diff)
downloadnncmpp-53fbb3dec127cee677563c07a9ca09280af500d4.tar.gz
nncmpp-53fbb3dec127cee677563c07a9ca09280af500d4.tar.xz
nncmpp-53fbb3dec127cee677563c07a9ca09280af500d4.zip
Fix the line editor/spectrum analyser interaction
The updater assumed the terminal cursor was invisible.
-rw-r--r--nncmpp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/nncmpp.c b/nncmpp.c
index 1366302..6601f6c 100644
--- a/nncmpp.c
+++ b/nncmpp.c
@@ -3789,9 +3789,15 @@ spectrum_redraw (void)
// let's hack around it in this case
if (g.spectrum_row != -1)
{
+ // Don't mess up the line editor caret, when it's shown
+ int last_x, last_y;
+ getyx (stdscr, last_y, last_x);
+
attrset (APP_ATTR (TAB_BAR));
mvaddstr (g.spectrum_row, g.spectrum_column, g.spectrum.spectrum);
attrset (0);
+
+ move (last_y, last_x);
refresh ();
}
else