Skip to content

Commit

Permalink
文字列長の検出方法を修正した。
Browse files Browse the repository at this point in the history
  • Loading branch information
Tatakinov committed Jul 10, 2022
1 parent fdf3c0e commit 65a7c7c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion yayalint.lua
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,8 @@ local function pos2linecol(t, data)
line = line + 1
end
t.line = line
t.col = utf8.len(string.sub(data[line], 1, pos))
-- 直前の文字まで+1がcaptureした文字の開始位置
t.col = utf8.len(string.sub(data[line], 1, pos - 1)) + 1
t.pos = nil
end
end
Expand Down

0 comments on commit 65a7c7c

Please sign in to comment.