chore: lint

This commit is contained in:
Chen Asraf
2023-05-16 11:24:57 +03:00
committed by Chen Asraf
parent 9e606d72a2
commit 5664c45580
2 changed files with 13 additions and 11 deletions

View File

@@ -138,16 +138,16 @@ function TextTransform.replace_selection(transform)
if #lines == 1 then
transformed = lines[1]:sub(1, start_col - 1)
.. transform(lines[1]:sub(start_col, end_col))
.. lines[1]:sub(end_col + 1)
.. transform(lines[1]:sub(start_col, end_col))
.. lines[1]:sub(end_col + 1)
else
transformed = lines[1]:sub(1, start_col - 1) .. transform(lines[1]:sub(start_col)) .. "\n"
for i = 2, #lines - 1 do
transformed = transformed .. transform(lines[i]) .. "\n"
end
transformed = transformed
.. transform(lines[#lines]:sub(1, end_col))
.. lines[#lines]:sub(end_col + 1)
.. transform(lines[#lines]:sub(1, end_col))
.. lines[#lines]:sub(end_col + 1)
end
-- replace the lines with the transformed lines