about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-02-08 19:17:56 -0800
committerKartik K. Agaram <vc@akkartik.com>2022-02-08 19:19:08 -0800
commite397220f9dd95d8bcfc85f5f16f2fb51de9b8d80 (patch)
tree90984a6107cac5b99a8c5af98f52c768ca5467e1
parent33ab842ffd9726a814508224de0486ffde342ab4 (diff)
downloadteliva-e397220f9dd95d8bcfc85f5f16f2fb51de9b8d80.tar.gz
Lua gotcha: iterating over strings yields strings
-rw-r--r--toot-toot.tlv6
-rw-r--r--zet.tlv2
2 files changed, 4 insertions, 4 deletions
diff --git a/toot-toot.tlv b/toot-toot.tlv
index 15d1742..e5b0765 100644
--- a/toot-toot.tlv
+++ b/toot-toot.tlv
@@ -218,15 +218,15 @@
     >        window:attron(curses.A_REVERSE)
     >        window:addch(' ')
     >        window:attroff(curses.A_REVERSE)
-    >        window:addch(s[i])
+    >        window:addstr(s[i])
     >      else
     >        -- most characters at cursor = render in reverse video
     >        window:attron(curses.A_REVERSE)
-    >        window:addch(s[i])
+    >        window:addstr(s[i])
     >        window:attroff(curses.A_REVERSE)
     >      end
     >    else
-    >      window:addch(s[i])
+    >      window:addstr(s[i])
     >    end
     >    newpos = newpos+1
     >  end
diff --git a/zet.tlv b/zet.tlv
index 13e59ba..0e91ea6 100644
--- a/zet.tlv
+++ b/zet.tlv
@@ -212,7 +212,7 @@
     >      y = y+1
     >      x = indent+1
     >    else
-    >      window:mvaddch(y+starty, x+startx, c)
+    >      window:mvaddstr(y+starty, x+startx, c)
     >      x = x+1
     >      if x >= startx + view_settings.width then
     >        y = y+1