Lua gotcha: iterating over strings yields strings
This commit is contained in:
parent
33ab842ffd
commit
e397220f9d
|
@ -218,15 +218,15 @@
|
||||||
> window:attron(curses.A_REVERSE)
|
> window:attron(curses.A_REVERSE)
|
||||||
> window:addch(' ')
|
> window:addch(' ')
|
||||||
> window:attroff(curses.A_REVERSE)
|
> window:attroff(curses.A_REVERSE)
|
||||||
> window:addch(s[i])
|
> window:addstr(s[i])
|
||||||
> else
|
> else
|
||||||
> -- most characters at cursor = render in reverse video
|
> -- most characters at cursor = render in reverse video
|
||||||
> window:attron(curses.A_REVERSE)
|
> window:attron(curses.A_REVERSE)
|
||||||
> window:addch(s[i])
|
> window:addstr(s[i])
|
||||||
> window:attroff(curses.A_REVERSE)
|
> window:attroff(curses.A_REVERSE)
|
||||||
> end
|
> end
|
||||||
> else
|
> else
|
||||||
> window:addch(s[i])
|
> window:addstr(s[i])
|
||||||
> end
|
> end
|
||||||
> newpos = newpos+1
|
> newpos = newpos+1
|
||||||
> end
|
> end
|
||||||
|
|
2
zet.tlv
2
zet.tlv
|
@ -212,7 +212,7 @@
|
||||||
> y = y+1
|
> y = y+1
|
||||||
> x = indent+1
|
> x = indent+1
|
||||||
> else
|
> else
|
||||||
> window:mvaddch(y+starty, x+startx, c)
|
> window:mvaddstr(y+starty, x+startx, c)
|
||||||
> x = x+1
|
> x = x+1
|
||||||
> if x >= startx + view_settings.width then
|
> if x >= startx + view_settings.width then
|
||||||
> y = y+1
|
> y = y+1
|
||||||
|
|
Loading…
Reference in New Issue