summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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();