diff options
author | Squibid <me@zacharyscheiman.com> | 2023-08-02 16:42:28 -0400 |
---|---|---|
committer | Squibid <me@zacharyscheiman.com> | 2023-08-02 16:42:28 -0400 |
commit | 33ab722485c15442a70859a88e1fe91377dc2e43 (patch) | |
tree | 3552c3609d85b5a793aa72dd6f22f018c5395036 /lua/utils | |
parent | ffc9552a256e23fed5c979f5fb0400f49130a8e5 (diff) | |
download | git-yodel-33ab722485c15442a70859a88e1fe91377dc2e43.tar.gz git-yodel-33ab722485c15442a70859a88e1fe91377dc2e43.tar.bz2 git-yodel-33ab722485c15442a70859a88e1fe91377dc2e43.zip |
inital commit
Diffstat (limited to '')
-rw-r--r-- | lua/utils/simple.lua | 11 |
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 |