about summary refs log tree commit diff stats
path: root/toot-toot.tlv
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-12-21 15:06:43 -0800
committerKartik K. Agaram <vc@akkartik.com>2021-12-21 15:06:43 -0800
commit53f235fd269c97b294360f12f36f6098ff7f165d (patch)
tree07a044b8999b63722bdfc2f50d9814ccc1946c20 /toot-toot.tlv
parent7eaca58762c8f37df5988b81ffcada38f88971d1 (diff)
downloadteliva-53f235fd269c97b294360f12f36f6098ff7f165d.tar.gz
minor tweaks
Diffstat (limited to 'toot-toot.tlv')
-rw-r--r--toot-toot.tlv21
1 files changed, 1 insertions, 20 deletions
diff --git a/toot-toot.tlv b/toot-toot.tlv
index 26eb591..5c4d897 100644
--- a/toot-toot.tlv
+++ b/toot-toot.tlv
@@ -67,7 +67,7 @@
 - __teliva_timestamp: original
   dbg:
     >-- helper for debug by print; overlay debug information towards the right
-    >-- reset debugy within refresh when using this
+    >-- reset debugy every time you refresh screen
     >function dbg(window, s)
     >  local oldy = 0
     >  local oldx = 0
@@ -162,7 +162,6 @@
     >    window:attrset(curses.color_pair(i))
     >    window:mvaddstr(3+i, 5, "========================")
     >  end
-    >  curses.refresh()
     >end
 - __teliva_timestamp: original
   menu:
@@ -238,11 +237,8 @@
 - render_delimiter:
     >function render_delimiter(window, s, pos, cursor)
     >  local newpos = pos
-    >--?   dbg(window, '==')
     >  for i=1,string.len(s) do
-    >--?     dbg(window, tostring(newpos)..' '..tostring(string.byte(s[i])))
     >    if newpos == cursor and i ~= 1 then
-    >--?       dbg(window, 'cursor: '..tostring(cursor))
     >      if s[i] == '\n' then
     >        -- newline at cursor = render extra space in reverse video before jumping to new line
     >        window:attron(curses.A_REVERSE)
@@ -268,10 +264,6 @@
     >function cursor_down(s, idx)
     >  local colidx = col_within_line(s, idx)
     >  local newidx = skip_past_newline(s, idx)
-    >--?   dbg(curses.stdscr(), tostring(idx))
-    >--?   dbg(curses.stdscr(), tostring(colidx))
-    >--?   dbg(curses.stdscr(), tostring(newidx))
-    >--?   curses.getch()
     >  while true do
     >    if s[newidx] == '\n' then break end
     >    local newcolidx = col_within_line(s, newidx)
@@ -397,11 +389,6 @@
     >function render(window)
     >  window:clear()
     >  debugy = 5
-    >--?   render_text(window, prose, 1, cursor)
-    >--?   curses.refresh()
-    >--? end
-    >
-    >--? function unused()
     >  local toots = split(prose, '\n\n===\n\n')
     >  pos = 1
     >  debugy = 5
@@ -410,16 +397,10 @@
     >      pos = render_delimiter(window, '\n\n===\n\n', pos, cursor)
     >    end
     >    pos = render_text(window, toot, pos, cursor)
-    >--?     if pos == cursor then
-    >--?       window:attron(curses.A_REVERSE)
-    >--?       window:addch(' ')
-    >--?       window:attroff(curses.A_REVERSE)
-    >--?     end
     >    print('')
     >    window:attron(curses.A_BOLD)
     >    window:addstr(string.len(toot))
     >    window:attroff(curses.A_BOLD)
-    >--?     print('')
     >  end
     >  curses.refresh()
     >end