Skip to content

Commit 738de39

Browse files
fix(indent): Default block indent to 0
Fixes issue when pressing Enter on empty src block
1 parent e5562a0 commit 738de39

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/orgmode/org/indent.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ local get_matches = ts_utils.memoize_by_buf_tick(function(bufnr)
212212
-- Only loop the content.
213213
for i = range.start.line + 1, range['end'].line - 2 do
214214
matches[i + 1] = vim.tbl_deep_extend('force', opts, {
215-
indent = vim.fn.indent(i + 1) + content_indent_pad,
215+
indent = vim.fn.indent(i + 1) + (content_indent_pad or 0),
216216
})
217217
end
218218
elseif type == 'paragraph' or type == 'drawer' or type == 'property_drawer' then

0 commit comments

Comments
 (0)