1
This commit is contained in:
Alex Yatskov 2024-01-21 18:16:10 -08:00
parent 099b314642
commit 5410200d69

View File

@ -212,7 +212,7 @@ local function parse_brace_range_params(brace_range)
end end
local brace_range_elements = {} local brace_range_elements = {}
-- local pad_newline = false local pad_newline = false
for row = brace_range.row1, brace_range.row2 do for row = brace_range.row1, brace_range.row2 do
local line = vim.fn.getline(row) local line = vim.fn.getline(row)
@ -227,23 +227,23 @@ local function parse_brace_range_params(brace_range)
col2 = brace_range.col2 - 1 col2 = brace_range.col2 - 1
end end
-- local indenting = true local indenting = true
for col = col1, col2 do for col = col1, col2 do
local char = line:sub(col, col) local char = line:sub(col, col)
local padding = false local padding = false
assert(#char > 0) assert(#char > 0)
-- if indenting then if indenting then
-- if char:match('%s') then if char:match('%s') then
-- if pad_newline and col == col1 then if pad_newline and col == col1 then
-- char = ' ' char = ' '
-- else else
-- padding = true padding = true
-- end end
-- else else
-- indenting = false indenting = false
-- end end
-- end end
table.insert(brace_range_elements, { table.insert(brace_range_elements, {
row = row, row = row,
@ -254,11 +254,11 @@ local function parse_brace_range_params(brace_range)
literal = is_string_literal({row = row, col = col}), literal = is_string_literal({row = row, col = col}),
}) })
-- if char == ',' then if char == ',' then
-- pad_newline = true pad_newline = true
-- else else
-- pad_newline = false pad_newline = false
-- end end
end end
end end