Skip to content

Commit 0c645d9

Browse files
Properly evaluate fallback <CR> expr mapping
1 parent 1284458 commit 0c645d9

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

lua/orgmode/org/mappings.lua

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -450,12 +450,7 @@ function OrgMappings:org_return()
450450
local rhs = config.old_cr_mapping.rhs
451451

452452
if config.old_cr_mapping.expr > 0 then
453-
vim.api.nvim_feedkeys(utils.esc(string.format('<C-r>=%s<CR>', rhs)), 'n', true)
454-
-- Echo empty message to remove the register feedkeys output
455-
vim.schedule(function()
456-
vim.cmd([[echo '']])
457-
end)
458-
return
453+
rhs = vim.api.nvim_eval(rhs)
459454
end
460455

461456
return vim.api.nvim_feedkeys(utils.esc(rhs), 'n', true)

0 commit comments

Comments
 (0)