about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-12-18 09:32:37 -0800
committerKartik K. Agaram <vc@akkartik.com>2021-12-18 09:32:37 -0800
commitd818efb7c824ffcfe7e62384cd70ef1b7aa098a8 (patch)
tree5a6dc4e5051c40d9b60caf1f72b161b37b677282
parent9fe884c03aafdbe9888115a64843327b926c0974 (diff)
downloadteliva-d818efb7c824ffcfe7e62384cd70ef1b7aa098a8.tar.gz
pay more attention to where we display the cursor
It's still just in app control; I'm resisting the urge to introduce
"smarts".
-rw-r--r--life.tlv1
-rw-r--r--src/lua.c3
-rw-r--r--toot-toot.tlv1
3 files changed, 4 insertions, 1 deletions
diff --git a/life.tlv b/life.tlv
index 2abfd08..606aca5 100644
--- a/life.tlv
+++ b/life.tlv
@@ -31,6 +31,7 @@
     >window = curses.stdscr()
     >-- animation-based app
     >window:nodelay(true)
+    >curses.curs_set(0)
     >lines, cols = window:getmaxyx()
 - __teliva_timestamp: original
   grid_char:
diff --git a/src/lua.c b/src/lua.c
index d40c716..c46f9c4 100644
--- a/src/lua.c
+++ b/src/lua.c
@@ -1042,7 +1042,8 @@ void developer_mode (lua_State *L) {
   init_pair(COLOR_PAIR_LUA_CONSTANT, COLOR_LUA_CONSTANT, COLOR_BACKGROUND);
   init_pair(COLOR_PAIR_MATCH, COLOR_MATCH_FOREGROUND, COLOR_MATCH_BACKGROUND);
   init_pair(COLOR_PAIR_ERROR, COLOR_ERROR_FOREGROUND, COLOR_ERROR_BACKGROUND);
-  nodelay(stdscr, 0);  /* make getch() block */
+  nodelay(stdscr, 0);  /* always make getch() block in developer mode */
+  curs_set(1);  /* always display cursor in developer mode */
   int switch_to_big_picture_view = 1;
   if (editor_view_in_progress(L))
     switch_to_big_picture_view = restore_editor_view(L);
diff --git a/toot-toot.tlv b/toot-toot.tlv
index ecef55c..ce7b2bd 100644
--- a/toot-toot.tlv
+++ b/toot-toot.tlv
@@ -147,6 +147,7 @@
 - __teliva_timestamp: original
   window:
     >window = curses.stdscr()
+    >curses.curs_set(0)  -- we'll simulate our own cursor
 - __teliva_timestamp: original
   render:
     >function render(window)