summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJfreegman <Jfreegman@gmail.com>2013-08-02 03:36:31 -0400
committerJfreegman <Jfreegman@gmail.com>2013-08-02 03:36:31 -0400
commit5541008b3b4042fb21d1be833a7290f954700e10 (patch)
treeaa4ec47261c72126bba3920c3b0ea361423d1ab9
parent91216719a528971110975883f59f48465567ced8 (diff)
fixed cursor
-rw-r--r--testing/toxic/main.c9
1 files changed, 9 insertions, 0 deletions
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) {
280 wresize(w, LINES-2, COLS); 280 wresize(w, LINES-2, COLS);
281} 281}
282 282
283/* Draws cursor relative to input */
284void position_cursor(WINDOW* w)
285{
286 int x, y;
287 getyx(w, y, x);
288 move(y, x);
289}
290
283int main(int argc, char* argv[]) { 291int main(int argc, char* argv[]) {
284 int ch; 292 int ch;
285 ToxWindow* a; 293 ToxWindow* a;
@@ -299,6 +307,7 @@ int main(int argc, char* argv[]) {
299 a->blink = false; 307 a->blink = false;
300 a->onDraw(a); 308 a->onDraw(a);
301 draw_bar(); 309 draw_bar();
310 position_cursor(a->window);
302 311
303 // Handle input. 312 // Handle input.
304 ch = getch(); 313 ch = getch();