aboutsummaryrefslogtreecommitdiffstats
path: root/lua/utils
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lua/utils/simple.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/lua/utils/simple.lua b/lua/utils/simple.lua
index 637dcde..bf158a7 100644
--- a/lua/utils/simple.lua
+++ b/lua/utils/simple.lua
@@ -19,4 +19,15 @@ function M.cmdcontent(cmd)
return b
end
+function M.longbufl(buf)
+ local a = vim.api.nvim_buf_get_lines(buf, 0, -1, true)
+ local greatest = 0
+ for i, l in ipairs(a) do
+ if string.len(a[i]) > greatest then
+ greatest = string.len(a[i])
+ end
+ end
+ return greatest
+end
+
return M