Skip to content

Commit

Permalink
fix(renderer_markdown): Indentation concealing no longer breaks when …
Browse files Browse the repository at this point in the history
…`add_padding = false`

Closes #267
  • Loading branch information
OXY2DEV committed Jan 29, 2025
1 parent 81b40bd commit aeb5b4e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/markview/renderers/markdown.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1983,7 +1983,7 @@ markdown.list_item = function (buffer, item)
local checkbox = get_state(item.checkbox);

if checkbox and config.conceal_on_checkboxes == true then
vim.api.nvim_buf_set_extmark(buffer, markdown.ns, range.row_start, range.col_start, {
vim.api.nvim_buf_set_extmark(buffer, markdown.ns, range.row_start, range.col_start + item.indent, {
undo_restore = false, invalidate = true,
end_col = range.col_start + (item.indent + #item.marker + 1),
conceal = ""
Expand Down Expand Up @@ -2013,7 +2013,7 @@ markdown.list_item = function (buffer, item)
end
end
elseif item.marker:match("[%+%-%*]") then
vim.api.nvim_buf_set_extmark(buffer, markdown.ns, range.row_start, range.col_start, {
vim.api.nvim_buf_set_extmark(buffer, markdown.ns, range.row_start, range.col_start + item.indent, {
undo_restore = false, invalidate = true,
end_col = range.col_start + (item.indent + #item.marker),
conceal = "",
Expand Down

0 comments on commit aeb5b4e

Please sign in to comment.