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 6fb7a62 commit 4e4d93aCopy full SHA for 4e4d93a
lua/orgmode/config/init.lua
@@ -212,11 +212,14 @@ end
212
---@see orgmode.config.mappings
213
function Config:setup_mappings(category, buffer)
214
if category == 'org' and vim.bo.filetype == 'org' and not vim.b[buffer].org_old_cr_mapping then
215
- vim.b[buffer].org_old_cr_mapping = utils.get_keymap({
+ local old_mapping = utils.get_keymap({
216
mode = 'i',
217
lhs = '<CR>',
218
buffer = buffer,
219
})
220
+ if old_mapping and old_mapping.rhs ~= '<Cmd>lua require("orgmode").action("org_mappings.org_return")<CR>' then
221
+ vim.b[buffer].org_old_cr_mapping = old_mapping
222
+ end
223
end
224
local maps = self:get_mappings(category, buffer)
225
if not maps then
0 commit comments