We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d8020e9 commit 2cb04d7Copy full SHA for 2cb04d7
lua/orgmode/org/mappings.lua
@@ -507,10 +507,17 @@ function OrgMappings:org_return()
507
508
local old_mapping = config.old_cr_mapping
509
510
+ -- No other mapping for <CR>, just reproduce it.
511
if not old_mapping or vim.tbl_isempty(old_mapping) then
512
return vim.api.nvim_feedkeys(utils.esc('<CR>'), 'n', true)
513
end
514
515
+ -- Lua mapping that installed a Lua function to call.
516
+ if old_mapping.callback then
517
+ return old_mapping.callback()
518
+ end
519
+
520
+ -- Classic, string-based mapping. Reconstruct it as faithfully as possible.
521
local rhs = utils.esc(old_mapping.rhs)
522
523
if old_mapping.expr > 0 then
0 commit comments