Skip to content

Commit 668fd60

Browse files
fix(mappings): Do not replace keycodes on fallback <CR> if not required
1 parent f5485be commit 668fd60

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lua/orgmode/org/mappings.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,7 @@ function OrgMappings:org_return()
642642
end
643643

644644
-- If mapping contains `\r`, it means it's already escaped and evaluated
645-
if global_cr_keymap.expr > 0 and not rhs:lower():find('\r') then
645+
if global_cr_keymap.expr > 0 and not rhs:lower():find('\r') and global_cr_keymap.replace_keycodes > 0 then
646646
rhs = vim.api.nvim_replace_termcodes(rhs, true, true, true)
647647
rhs = vim.api.nvim_eval(rhs)
648648
end

0 commit comments

Comments
 (0)