Skip to content

Commit 9cf968e

Browse files
Merge pull request #165 from rahulsalvi/better-foldtext
fix org_hide_leading_stars on folded lines
2 parents 7c37bac + c3c787f commit 9cf968e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lua/orgmode/org/indent.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ end
9393
local function foldtext()
9494
local line = vim.fn.getline(vim.v.foldstart)
9595
if config.org_hide_leading_stars then
96-
return vim.fn.substitute(line, '\\(^\\*+\\)', '\\=repeat(" ", len(submatch(0))-1) . "*"', '') .. config.org_ellipsis
96+
return vim.fn.substitute(line, '\\(^\\*\\+\\)', '\\=repeat(" ", len(submatch(0))-1) . "*"', '')
97+
.. config.org_ellipsis
9798
end
9899
return line .. config.org_ellipsis
99100
end

0 commit comments

Comments
 (0)