fix(parser): Fix indentation when guides are hidden
This commit is contained in:
@@ -160,11 +160,10 @@ function M.get_lines(outline_items)
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
if config.options.show_guides then
|
|
||||||
-- makes the guides
|
|
||||||
|
|
||||||
for index, _ in ipairs(line) do
|
for index, _ in ipairs(line) do
|
||||||
-- all items start with a space (or two)
|
-- all items start with a space (or two)
|
||||||
|
if config.options.show_guides then
|
||||||
|
-- makes the guides
|
||||||
if index == 1 then
|
if index == 1 then
|
||||||
line[index] = ' '
|
line[index] = ' '
|
||||||
-- i f index is last, add a bottom marker if current item is last,
|
-- i f index is last, add a bottom marker if current item is last,
|
||||||
@@ -193,12 +192,12 @@ function M.get_lines(outline_items)
|
|||||||
running_length + vim.fn.strlen(ui.markers.vertical) - 1
|
running_length + vim.fn.strlen(ui.markers.vertical) - 1
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
line[index] = line[index] .. ' '
|
line[index] = line[index] .. ' '
|
||||||
|
|
||||||
running_length = running_length + vim.fn.strlen(line[index])
|
running_length = running_length + vim.fn.strlen(line[index])
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
local final_prefix = line
|
local final_prefix = line
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user