about summary refs log tree commit diff stats
path: root/termbox
diff options
context:
space:
mode:
Diffstat (limited to 'termbox')
-rw-r--r--termbox/termbox.c7
-rw-r--r--termbox/termbox.h6
2 files changed, 3 insertions, 10 deletions
diff --git a/termbox/termbox.c b/termbox/termbox.c
index 0e0669ad..1ae275ce 100644
--- a/termbox/termbox.c
+++ b/termbox/termbox.c
@@ -30,7 +30,6 @@ struct cellbuf {
 };
 
 #define CELL(buf, x, y) (buf)->cells[(y) * (buf)->width + (x)]
-#define IS_CURSOR_HIDDEN(cx, cy) (cx == -1 || cy == -1)
 #define LAST_COORD_INIT -1
 
 static struct termios orig_tios;
@@ -202,8 +201,7 @@ void tb_present() {
       x += w;
     }
   }
-  if (!IS_CURSOR_HIDDEN(cursor_x, cursor_y))
-    write_cursor(cursor_x, cursor_y);
+  write_cursor(cursor_x, cursor_y);
   bytebuffer_flush(&output_buffer, inout);
 }
 
@@ -212,8 +210,7 @@ void tb_set_cursor(int cx, int cy)
   assert(termw != -1);
   cursor_x = cx;
   cursor_y = cy;
-  if (!IS_CURSOR_HIDDEN(cursor_x, cursor_y))
-    write_cursor(cursor_x, cursor_y);
+  write_cursor(cursor_x, cursor_y);
 }
 
 void tb_change_cell(int x, int y, uint32_t ch, uint16_t fg, uint16_t bg)
diff --git a/termbox/termbox.h b/termbox/termbox.h
index 4c5d327a..64c1c4eb 100644
--- a/termbox/termbox.h
+++ b/termbox/termbox.h
@@ -60,12 +60,8 @@ struct tb_cell *tb_cell_buffer();
 void tb_clear(void);
 void tb_set_clear_attributes(uint16_t fg, uint16_t bg);
 
-/* Move the cursor. Upper-left character is (0, 0).
- */
+/* Move the cursor. Upper-left character is (0, 0). */
 void tb_set_cursor(int cx, int cy);
-/* To hide the cursor, call tb_set_cursor(TB_HIDE_CURSOR, TB_HIDE_CURSOR).
- * Cursor starts out hidden. */
-#define TB_HIDE_CURSOR -1
 
 /* Modify a specific cell of the screen. Don't forget to call tb_present() to
  * commit your changes. */