diff options
Diffstat (limited to 'relabel.lua')
-rw-r--r-- | relabel.lua | 3 |
1 files changed, 1 insertions, 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 | |||
285 | local function calcline (s, i) | 285 | local function calcline (s, i) |
286 | if i == 1 then return 1, 1 end | 286 | if i == 1 then return 1, 1 end |
287 | local rest, line = s:sub(1,i):gsub("[^\n]*\n", "") | 287 | local rest, line = s:sub(1,i):gsub("[^\n]*\n", "") |
288 | local col = #rest | 288 | return 1 + line, #rest + 1 |
289 | return 1 + line, col ~= 0 and col or 1 | ||
290 | end | 289 | end |
291 | 290 | ||
292 | 291 | ||