Skip to content

Commit b07b4f8

Browse files
Fix new line indent on checkbox list items
1 parent bb5eb3f commit b07b4f8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lua/orgmode/org/indent.lua

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,13 @@ local function indentexpr()
155155
end
156156
end
157157

158+
if prev_line_match.type == 'list' and match.type ~= 'list' then
159+
local prev_line_list_item = get_is_list_item(vim.fn.getline(prev_linenr))
160+
if prev_line_list_item then
161+
return vim.fn.indent(prev_linenr) + prev_line_list_item:len()
162+
end
163+
end
164+
158165
if noindent_mode then
159166
return 0
160167
end

0 commit comments

Comments
 (0)