Fix multiline strings for box command

This commit is contained in:
Talia 2018-08-15 09:37:08 +02:00
parent 0538cb57e8
commit 9ba10aff75

View file

@ -37,8 +37,13 @@ column = (col) ->
print "├─"..string.rep("─",width).."─┤" print "├─"..string.rep("─",width).."─┤"
print "└─"..string.rep("─",width).."─┘" print "└─"..string.rep("─",width).."─┘"
match_all = (str, pat, init=0) ->
s,e = str\find(pat, init)
if s then
return str\sub(s,e), match_all(str, pat, e+1)
box = (box) -> box = (box) ->
column { box } column { match_all box, '[^\n]+' }
CLASS = [[ CLASS = [[
print vim.col { print vim.col {