Fix multiline strings for box command

This commit is contained in:
Talia 2018-08-15 09:37:08 +02:00
parent 0538cb57e8
commit 9ba10aff75
1 changed files with 6 additions and 1 deletions

View File

@ -37,8 +37,13 @@ column = (col) ->
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) ->
column { box }
column { match_all box, '[^\n]+' }
CLASS = [[
print vim.col {