From 33ab722485c15442a70859a88e1fe91377dc2e43 Mon Sep 17 00:00:00 2001 From: Squibid Date: Wed, 2 Aug 2023 16:42:28 -0400 Subject: inital commit --- lua/utils/simple.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lua/utils/simple.lua') 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 -- cgit v1.2.1