From e4492ad59afa389102695bf49a9bf847130ad352 Mon Sep 17 00:00:00 2001 From: Milan Glacier Date: Thu, 13 Jun 2024 21:54:55 -0400 Subject: [PATCH] fix: fix filetype detection error on macos for `org edit special`. --- lua/orgmode/objects/edit_special/types/src.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/orgmode/objects/edit_special/types/src.lua b/lua/orgmode/objects/edit_special/types/src.lua index ebb826f6d..b04e6ce6b 100644 --- a/lua/orgmode/objects/edit_special/types/src.lua +++ b/lua/orgmode/objects/edit_special/types/src.lua @@ -73,6 +73,9 @@ function EditSpecialSrc:init() -- Only the "content" of the block should change, however we might not have content yet -- so base the range off of the name of the block local ft = self.src_block.children.parameters.text + if ft then + ft = utils.detect_filetype(ft) or ft:lower() + end local bufnr = es_utils.make_temp_buf() if not bufnr or not vim.api.nvim_buf_is_valid(bufnr) then