From 9ba10aff755f8bc11d2d70c1d9384f3c699f5715 Mon Sep 17 00:00:00 2001 From: DarkWiiPlayer Date: Wed, 15 Aug 2018 09:37:08 +0200 Subject: [PATCH] Fix multiline strings for box command --- lua/vim.moon | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lua/vim.moon b/lua/vim.moon index 758e433..8389d0a 100644 --- a/lua/vim.moon +++ b/lua/vim.moon @@ -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 {