From 5541008b3b4042fb21d1be833a7290f954700e10 Mon Sep 17 00:00:00 2001 From: Jfreegman Date: Fri, 2 Aug 2013 03:36:31 -0400 Subject: fixed cursor --- testing/toxic/main.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'testing/toxic/main.c') diff --git a/testing/toxic/main.c b/testing/toxic/main.c index cdc6dc16..b014a79f 100644 --- a/testing/toxic/main.c +++ b/testing/toxic/main.c @@ -280,6 +280,14 @@ void prepare_window(WINDOW* w) { wresize(w, LINES-2, COLS); } +/* Draws cursor relative to input */ +void position_cursor(WINDOW* w) +{ + int x, y; + getyx(w, y, x); + move(y, x); +} + int main(int argc, char* argv[]) { int ch; ToxWindow* a; @@ -299,6 +307,7 @@ int main(int argc, char* argv[]) { a->blink = false; a->onDraw(a); draw_bar(); + position_cursor(a->window); // Handle input. ch = getch(); -- cgit v1.2.3