From fa22d95a5c26ed6b917dda43f61781c0b709f282 Mon Sep 17 00:00:00 2001
From: Validark <Validarkness@gmail.com>
Date: Fri, 8 Jul 2022 06:13:52 -0500
Subject: Fix calcline returning the wrong column

Previously, column numbers would effectively start at 0, except the first character would register as 1 so the column numbers would go `11234567`.
---
 relabel.lua | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/relabel.lua b/relabel.lua
index df5c8c8..f4f4546 100644
--- a/relabel.lua
+++ b/relabel.lua
@@ -285,8 +285,7 @@ end
 local function calcline (s, i)
   if i == 1 then return 1, 1 end
   local rest, line = s:sub(1,i):gsub("[^\n]*\n", "")
-  local col = #rest
-  return 1 + line, col ~= 0 and col or 1
+  return 1 + line, #rest + 1
 end
 
 
-- 
cgit v1.2.3-55-g6feb